Giter Club home page Giter Club logo

Comments (6)

peldhose avatar peldhose commented on July 23, 2024

Can somebody pls help me to resolve this issue,
when i run server (2TB SSD + m4.Large) , response is very slow and its stuck normally ,also am getting this error too ..

Error on request:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 209, in run_wsgi
execute(self.server.app)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 200, in execute
write(data)
File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 181, in write
self.wfile.write(data)
IOError: [Errno 32] Broken pipe

from tileserver.

rmarianski avatar rmarianski commented on July 23, 2024

Some tiles are expected to be slow, and it tends to be zoom level and area dependent. As you suggested in the issue title, you can look into pre-generating tiles to help, which is what using tilequeue will allow you to do. You can also cache tiles for extended periods of time. To get started with tilequeue, I'd suggest going through the README and the sample configuration. Generally you want to first "seed" tiles to add them to a work queue, and then "process" them which pulls them from the queue and generates tiles.

If that's the whole stack trace, then I expect it's ok. It looks like it's just that clients timed out waiting for a response, and when the server tried to send the response the socket was closed.

from tileserver.

peldhose avatar peldhose commented on July 23, 2024

hi @rmarianski , thankyou for reply.
actually i have gone through README and conf.yaml.sample a lot but coulnd't find any info to properly run tilequeue and cache to manage this issues.Saw buffer {} but no more samples to get through.It will be greatfull if you can give me a sample of tilequeue running command.
also redis is installed on server and uncommented redis option in config, but doesnt seem its connecting to redis for caching..

thank you in advance

from tileserver.

rmarianski avatar rmarianski commented on July 23, 2024

I'm guessing the confusion is coming from the fact that tilequeue doesn't generate artifacts that tileserver can directly consume. In our production environment, tileserver was only meant to handle requests for tiles that weren't pre-generated. In other words, if the tile was generated, it wouldn't even see the request.
There was a separate component that was responsible for satisfying those requests, tapalcatl. tilequeue would write tiles to s3, and then tapalcatl would read from that s3 location to try and satisfy those requests. We also had a cache sitting in front of everything that would manage the communication, which was to try tapalcatl, and if it got a 404 then it would send the request to tileserver.
The easiest bit to set up would be the redis cache for tileserver. The code that sets that up is here:

cache = NullCache()
cache_config = config.get('cache') or os.environ.get('CACHE_TYPE')
if cache_config:
cache_type = os.environ.get('CACHE_TYPE') or cache_config.get('type')
if cache_type == 'redis':
import redis
from tileserver.cache import RedisCache
redis_config = cache_config.get('redis', {})
redis_url = os.environ.get('REDIS_URL')
if not redis_url:
redis_url = redis_config.get('url')
redis_client = redis.from_url(redis_url)
redis_options = redis_config.get('options') or {}
cache = RedisCache(redis_client, **redis_options)
elif cache_type == 'file':
from tileserver.cache import FileCache
file_config = cache_config.get('file', {})
cache = FileCache(file_config.get('prefix'))

I'd suggest ensuring the redis path gets triggered on startup, and if not figuring out why that is. I'd expect this config to work:

cache:
  type: redis
  redis:
    url: redis://localhost:6379
    options:
      # prefix added onto saved keys for namespace purposes
      key_prefix: tiles
      # time in seconds to keep key in cache
      expires: 900

from tileserver.

rmarianski avatar rmarianski commented on July 23, 2024

By the way, in case you happen to be interested and haven't seen this: https://mapzen.com/blog/long-term-support-mapzen-maps/

from tileserver.

peldhose avatar peldhose commented on July 23, 2024

Hey ... very much thankyou for the info ... i was looking for the exact info..

from tileserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.