lundi 7 décembre 2015

Start rails server in production mode local

we have some concurrency issues, that I'd like to reproduce on my machine. On production we have a passenger instance running. To get concurrent request, I tried to start the rails app (Rails 3.2) with thin and a threaded option like this:

bundle exec thin --threaded -p 3000 --threadpool-size 50 start -e production

I also ran RAILS_ENV=production bundle exec rake assets:precompile to get everything like in production.

However, when I access localhost:3000 in my browser, I get part of the HTML (it displays), but then the browser runs into a timeout with GET http://localhost:3000/ net::ERR_EMPTY_RESPONSE and loading of the page stops.

When I stop thin with Ctrl-C, I get the following message multiple times:

Unexpected error while processing request: Attempt to unlock a mutex which is not locked

Anybody an idea, why the browser gets a timeout, or how to get concurrent requests working on a local machine with thin? It would also be no problem to try another server like puma, but a whole apache / passenger installation would be too much.

Aucun commentaire:

Enregistrer un commentaire