Question

Having a problem with an app that runs fine in debug but not in production.

Error is java.util.concurrent.TimeoutException: No response received after 1000, after trying to download from an http link. Set ws.timeout higher and it works, but only in debug and not prod. Any ideas on how to debug what is going on in production mode?

Pas de solution correcte

Autres conseils

I decided to put this answer as various cases because I thought there will be more cases which can be added in future and can be used as a check-list if someone comes across the same problem.

Is your Play! app running behind a front-end web-server like Nginx/Apache in PROD ?

This might be a very common scenario because the front-end web server stops accepting connections after a certain number of requests have not been completed by Play! In a DEV/DEBUG mode you may not usu. have a front-end web-server.

Is your PROD configuration same as DEV configuration ?

Cross-check your configuration for PROD and DEV, esp. the threadpool configuration (if you have any parallelism-factor, parallelism-max etc), memory (-Xmx), GC settings, Java environment etc.

Did you benchmark your Play! app ?

If you haven't done this yet, benchmark your Play! app in dev mode and prod mode using a HTTP benchmarking tool like wrk (and Gatling later). Once you get the numbers you can see if you want to tune your Play! app to receive more number of connections tweaking OS parameters or increasing Timeout (FWIW, increasing Timeouts without benchmarking is a bad idea.).

Though upgrading to Play 2.2 may not solve the mystery behind Debug vs. Prod mode, it is worth taking a look at it because of overall performance improvement which I have experienced.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top