Is restarted?
Added by Dara Durum about 14 years ago
Hi!
We have installed Apache (proxy) with Rails in Win2k3.
Today I saw this error in Apache:
[Thu Sep 23 19:59:20 2010] [error] [client 89.135.103.175] (OS 10054)An existing connection was forcibly closed by the remote host. : proxy: error reading status line from remote server 127.0.0.1
[Thu Sep 23 19:59:20 2010] [error] [client 89.135.103.175] proxy: Error reading from remote server returned by /
89.135.103.175 - - [23/Sep/2010:19:59:19 +0200] "GET / HTTP/1.1" 502 505
[Thu Sep 23 19:59:21 2010] [error] (OS 10061)No connection could be made because the target machine actively refused it. : proxy: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed
May Rails restarted?
Rails logging set to debug kind, but I don't see any restarts, or bug logging in logs.
May it caused by Apache, and not Rails... :-(
Thanks for your help:
dd
Replies (5)
RE: Is restarted? - Added by Felix Schäfer about 14 years ago
Your apache can't contact your rails server (probably mongrel or webrick), which might be caused by a number of things: the rails server died, there is a firewall between them, the address of the rails server is misconfigured in apache, and so on.
RE: Is restarted? - Added by Dara Durum about 14 years ago
Hi!
This was a temporary thing. Previously everything is working well.
Rail is just like Pylons (Python)?
Pylons keeps N threads in the background for serve requests.
If any of them died, the Pylons stayin alive.
And Pylons shown "starting" messages in the log, so I can see when it is restarted.
Is Rails do this?
I wanna determine that this was a restart or not.
And may mongrel can log the restarts...
Thanks:
dd
RE: Is restarted? - Added by Felix Schäfer about 14 years ago
If you are using one mongrel only: I don't think it will restart itself, if it dies, it dies (and that mongrel isn't multithreaded, it will always serve one request only at a time). If you use mongrel_cluster, it might take care of restarting dead threads for you, but I've never used mongrel, so I can't say for sure. You might have better luck with those questions on the mongrel page itself or their mailinglist/forum.
RE: Is restarted? - Added by Dara Durum about 14 years ago
Hi!
And what do you suggest? What is the service handler that I can use as Pylons in Windows.
This is very horrible that mongrel can serve only on request... :-(
If someone makes long request then others cannot access the server... :-(
(I restart the service on problem automatically.)
Thanks:
dd
RE: Is restarted? - Added by Felix Schäfer about 14 years ago
Dara Durum wrote:
And what do you suggest? What is the service handler that I can use as Pylons in Windows.
This is very horrible that mongrel can serve only on request... :-(
If someone makes long request then others cannot access the server... :-(
Mongrel does exactly that: server one request at a time, it was never intended for more. A better solution would be to use passenger, but that doesn't work on windows. For Mongrel, there is a plugin here http://rubygems.org/gems/mongrel_cluster that allows you to start multiple mongrels at a time, and might be able to restart them as needed, though I'm not sure about that as I've never used it.