Error when fetching POS config from the server via API (Error code: 500 or 503)
1. Your website is enabling maintenance mode
Error response should look like this
Maintenance mode is on.
Contact your developer or the guy in charge to turn maintenance mode off.
2. You're using Cloudflare
After login into POS, it makes so many requests for static content (image, CSS), and API calls which will reach the rate limit of your Cloudflare rate limit setting.
Go to the Cloudflare panel and white list requests from POS or increase the rate limit for requests from POS on your Cloudflare setting.
3. You're using Redis cache for session storage
The error should look like this
You reach the max_concurency setting for Redis. POS includes session data in all API calls after login, and it sends so many requests in a second that the server can not server at once. It means that every request send later will move into the queue, once the queue run out of the number set in max_concurrency, it will return error 503: Service Unavailable.
Increase max_concurency in the Redis setting by running the following command