Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API down/slow #153

Closed
stanvass opened this issue Jan 14, 2020 · 6 comments
Closed

API down/slow #153

stanvass opened this issue Jan 14, 2020 · 6 comments

Comments

@stanvass
Copy link

We're getting timeouts on the API currently. It works intermittently with lag, but usually times out. Known issue? What can we do about it. Thanks.

@webprofusion-chrisc
Copy link
Member

Hi, thanks for raising this. Performing server reboot now. Our API is currently running at 100% uptime but has slowed in response time over the last 24hrs, will investigate - it's probably a caching issue.

@webprofusion-chrisc
Copy link
Member

As a follow up - I am seeing a problem on the server with high CPU, it's a combination of a problem with our MongoDB based caching database which sometimes starts using a lot of CPU for no obvious reason (requiring re-creation of the db) and automated server OS updates which also take a while to complete, combined with fairly high general usage of the API.

As mentioned elsewhere there is ongoing work to provide read-only versions of the API that others can host (see #148) and I intend to start using at least one of these clones to start serving API reads by default. Behind the scenes the plan is to use a cloudflare worker to decide if requests should be served by a read-only clone or by the master API (read/write). This raises the overall latency and response time in some cases but has the advantage that the read-only clones are cheap to run and quite fast (~300ms response times). This is still a work in progress but is quite urgent.

@webprofusion-chrisc
Copy link
Member

webprofusion-chrisc commented Jan 15, 2020

Ok this is mostly resolved but people can start testing out the load balanced API using:

http://api-router.openchargemap.io/

e.g. https://api-router.openchargemap.io/v3/poi

Eventually this will also be the handler for api.openchargemap.io

@stanvass
Copy link
Author

Hi, we tried the new URL, but we get back CloudFlare errors.

@webprofusion-chrisc
Copy link
Member

@stanvass sorry missed you reply. The api-router service is now in beta (being used by map.openchargemap.io) but will eventually this will just be api.openchargemap.io - this works using cloudflare workers to decide which back-end (primary api and one or more mirrors) to route requests to based on type.

@webprofusion-chrisc
Copy link
Member

Also note that Webprofusion Pty Ltd (my company) is now offering hosted & managed APIs commercially - these will have an SLA for avg response time and availability and are available as monthly or annual subscription (from $199 USD monthly, depending on requirements). Most people will still use the free API but some users may require a commercial level of service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants