-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server hanging after running for over 30 seconds #218
Comments
If you open a socket using another tool on that port, does the same problem occur? Lots of problems like this I've found are due to router problems, especially if any NAT traversal is taking place somewhere |
Good thoughts, however if you're talking physical router problems, I thought my |
Oh ok. Have you tried subbing out your code for a nickel hello world and seeing if you get the same result? Just trying to isolate the problem a bit more. #[macro_use] extern crate nickel;
use nickel::Nickel;
fn main() {
let mut server = Nickel::new();
server.utilize(router! {
get "**" => |_req, _res| {
"Hello world!"
}
});
server.listen("127.0.0.1:6767");
} Is it after a certain number of requests? Is it linked to the number of requests at all do you think? |
The thing that steered me towards it being a config issue was that the same code works fine on your ubuntu machine - odd because everything apart from the config should be the same. Anything special in /etc/hosts or iptables? |
Thanks for the help! I think I'm leaning toward blaming apache as of now. After checking the apache error logs, I get something similar to this serverfault problem. And after the suggested changes, it's working as of now! I'm curious as to what's different between the nickel server and the other types of sites I'm running (ghost blog and a few Play! Framework applications). |
@freiguy1 If apache is using keepalive, then it's likely causing issues due to hyperium/hyper#368 (Apache isn't really at fault, just keepalive being badly handled) Let me know if you find a different root cause though! |
@Ryman Ok, that makes a lot of sense. That answers my question
Thanks for the input! |
I've a Debian server and I'm trying to run the release version of my simple web application using nickel.rs, and after it's been running for as little as 30 seconds, it stops responding. I added a middleware to log every request, and that doesn't even get reached. When I use
curl
on the server pointed to localhost, that acts the same way as the browsers. They just spin indefinitely.The worst problem is that I try the same code/same version of rust on a different Ubuntu server and it never hangs.
Any idea how to remedy this problem?
The text was updated successfully, but these errors were encountered: