ruby - If thin timeouts, the instance won't reply anymore -
i have setup:
- ruby 1.8.7
- rails 2.3.18
- three instances of thin
- nginx proxy
it's high concurrency website. time time, there request raises timeout in 1 of thin instances (due heavy operations). when happens, instance cpu goes 100%, , stops replying new request.
nginx default has option forward request next upstream, , request ends in timeout, ends 3 instances using 100% cpu, , not replying request.
we have modified nginx option to:
proxy_next_upstream off;
but still have issue. if user refreshes page, end breaking our thin instances.
- why thin keep running @ 100% cpu if request ends in timeout?
- is there way make thin continue running fine if 1 of requests ends in timeout?
- what best way automatically restart instances if blocked nginx hook calls command if receiving timeouts?
i know need upgrade ruby , rails versions, , know heavy operations should done in background, please don't make comments that, , stick questions.
Comments
Post a Comment