Upgrade From Fedora 15 to 17: nginx Doesn't Work

Had nginx 1.0.5 running on a Fedora 15 system just fine for months.
Upgraded the server from F15 to F17. At first, all seems well, but over
time, I keep getting 500 errors on proxied sites. Logs say: “socket()
failed (24: Too many open files) while connecting to upstream”. Has
anyone else had this experience? If so, what’s the root cause?

Had to revert server back to a backup to get sites functional.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227162,227162#msg-227162

Hmmm… Apparently there seem to be some official packages of Nginx in
Fedora repositories.
However, there have been some updates of the 1.0.x branch there. 1.0.5
seems to be far outdated.

For example the latest seems to be a 1.0.15-4 version of the package:
http://lists.fedoraproject.org/pipermail/package-announce/2012-May/081214.html

I can’t check much, since I don’t have Fedora. I just did little online
research on the Fedora-Announce
mailing-listhttp://lists.fedoraproject.org/pipermail/package-announce/
.

Hope my 2 cents helped,

B. R.

-------- Original-Nachricht --------

Datum: Mon, 4 Jun 2012 19:32:32 -0400 (EDT)
Von: “ptiseo” [email protected]
An: [email protected]
Betreff: Upgrade From Fedora 15 to 17: nginx Doesn’t Work

Had nginx 1.0.5 running on a Fedora 15 system just fine for months.

Months? MONTHS? So you are not a new *nix user?

Upgraded the server from F15 to F17. At first, all seems well, but over
time, I keep getting 500 errors on proxied sites. Logs say: “socket()
failed (24: Too many open files) while connecting to upstream”. Has
anyone else had this experience? If so, what’s the root cause?

The root cause you ask? You must be joking. I mean… how hard is it to
interpret “Too many open files”?

Had to revert server back to a backup to get sites functional.

Ohhh boy. All you need to do is increase the open file limit in
/etc/sysctl.conf and /etc/security/limits.conf.

In my installation I currently have…

… in /etc/sysctl.conf:
fs.file-max = 5049800

… in /etc/security/limits.conf:

  •           -       nofile          101062
    

I assume you used the same nginx.conf like in the old install? So no
need for me to mention worker_rlimit_nofile. Right?

Setting/getting file limits is really basic linux system admin
knowledge. I don’t want to be harsh but not knowing that and going back
from a fresh installed Fedora 17 to a backup of Fedora 15 because of the
above error is crazy. You need to spend some time educating yourself in
how to maintain a *nix system.

And while at it… please take your time to learn how to use Google:
http://www.google.com/search?q=Too+many+open+files&ie=utf-8&oe=utf-8&aq=t

If you don’t find the solution in the first 10 or 20 links then I am
going to eat xx xxxxx!

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de

@steve: nginx seems to attract the hostile and malpadapted? I’ve seen
more arrogant a**es in this forum than most other places. You guys need
to relax; it’s just software. No need for you to go nuts like that. It
just shows badly on you.

The reason I restore from backup is because I needed that proxy online
for development. And, I have used Linux for a while that can be counted
in more than months. Do you know what they say about “assume”?

I did Google. I saw that worked for some and not for others. I tried it,
it didn’t work for me. My file-max setting was already some 200K.

So, let me ask this, why would I need to increase open file limit
anyways? This is a low traffic proxy.

@BR: Thanks for not being as bad as steve. I did notice that Fedora does
not have an up-to-date package. For now, I will stay with the backup and
spin up another virtual machine to see if I can test further.

If anyone has any other ideas than the first 20 Google hits, I’d love to
hear of them. Thx.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227162,227165#msg-227165

On Jun 4, 2012 9:45 PM, “ptiseo” [email protected] wrote:

@steve: nginx seems to attract the hostile and malpadapted? I’ve seen
more arrogant a**es in this forum than most other places. You guys need
to relax; it’s just software. No need for you to go nuts like that. It
just shows badly on you.

Hardly the case. This is a pretty well mannered mailing list compared to
some to which I subscribe.

But, to be constructive, please do not top post. It’s very confusing
when
trying to follow a threaded discussion.

So, please answer the question asked -do you have an entry in your
nginx.conf for “worker_rlimit_nofile”?

Posting your full nginx.conf might help.

The reason I restore from backup is because I needed that proxy online
for development. And, I have used Linux for a while that can be counted
in more than months. Do you know what they say about “assume”?

I did Google. I saw that worked for some and not for others. I tried it,
it didn’t work for me. My file-max setting was already some 200K.

To which settings(s) are you referring?

So, let me ask this, why would I need to increase open file limit
anyways? This is a low traffic proxy.

Maybe an issue with how you’ve configured your system which has
nothing
to do with nginx? Not to be one of those hostile, maladaped, arrogant
people to whom you referred, but this isn’t a Fedora mailing list.
Perhaps
you can find help there in determining what process(es) is/are using all
of
those file descriptors. Maybe one of them will hold your hand and not
hurt
your feelings in the process. Calling people names is certainly not a
good way to get people to help you.

@BR: Thanks for not being as bad as steve. I did notice that Fedora does
not have an up-to-date package. For now, I will stay with the backup and
spin up another virtual machine to see if I can test further.

If anyone has any other ideas than the first 20 Google hits, I’d love to
hear of them. Thx.

Jim O.

Hello,

@BR: Thanks for not being as bad as steve.
‘As bad’? I was really trying to help. To my opinion, it’s always better
to
have the least outdated version, so 1.0.15 is way better than 1.0.5.
If I appeared arrogant to you, well, nvm…

Calling people names is certainly not a good way to get people to help
you.
I totally agree. I won’t lose anymore time on your case.


B. R.

-------- Original-Nachricht --------

Datum: Mon, 4 Jun 2012 21:45:36 -0400 (EDT)
Von: “ptiseo” [email protected]
An: [email protected]
Betreff: Re: Upgrade From Fedora 15 to 17: nginx Doesn’t Work

@steve: nginx seems to attract the hostile and malpadapted? I’ve seen
more arrogant a**es in this forum than most other places. You guys need
to relax; it’s just software. No need for you to go nuts like that. It
just shows badly on you.

LOL. It’s almost 4am over here in Europe and I was sitting here reading
stuff (fighting with sleep) and from time to time looking at the nginx
mailing list and then saw your post and was falling almost off my chair.
Could not resist and had to post. :wink:

The reason I restore from backup is because I needed that proxy online
for development. And, I have used Linux for a while that can be counted
in more than months. Do you know what they say about “assume”?

I did Google. I saw that worked for some and not for others. I tried it,
it didn’t work for me. My file-max setting was already some 200K.

In sysctl.conf? Or /etc/security/limits.conf? Does your system use PAM?

So, let me ask this, why would I need to increase open file limit
anyways? This is a low traffic proxy.

Well… you have obviously the need else nginx would not complain about
a low open file descriptor limit. Looks like you configured nginx to use
a lot of descriptors. But how can I tell without having seen your nginx
configuration (I left my crystal ball in the office)?

If you want real good help then post your nginx.conf, the output of
“ulimit -a”, the content of /etc/sysctl.conf, the content of
/etc/security/limits.conf, the output of “ls -lah
/etc/security/limits.d/*” and the content of files found in
/etc/security/limits.d/

@BR: Thanks for not being as bad as steve. I did notice that Fedora does
not have an up-to-date package. For now, I will stay with the backup and
spin up another virtual machine to see if I can test further.

If anyone has any other ideas than the first 20 Google hits, I’d love to
hear of them. Thx.

http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/

http://blog.unixy.net/2010/11/nginx-accept-failed-24-too-many-open-files-while-accepting-new-connection/

http://forum.nginx.org/read.php?2,187416

http://forum.nginx.org/read.php?2,61252

http://forum.nginx.org/read.php?2,13111

etc…

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227162,227165#msg-227165


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx


NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a

I forgot to click “Follow Topic”, so I’m posting again just to do that,
as I
don’t see any way to alter my previous post to enable follow.

So please reply after this post or in some other way by which I’ll be
notified of your reply.

Thanks!

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227162,236247#msg-236247

I’ve tried to fix the “Too many connections problem” following the
suggested
sites:
http://www.cyberciti.biz/tips/linux-procfs-file-descriptors.html
http://www.cyberciti.biz/faq/linux-unix-nginx-too-many-open-files/#comment-79592

I’ve ran into other seemingly nonsensical errors.

I have a new unused server here where I’m trying to install/use nginx
for
php for the first time.

Strange error for unused server?

Firstly, it seems strange to me that I would get “Too many open files”
for a
new unused server. ulimit -Hn/Sn showed 4096/1024 which seemed adequate
whie
nginx was using only 9/10 acccording to: ls -l /proc//fd | wc -l

Anyhow, I followed the instructions and now I get this error:

2013/02/15 16:30:39 [alert] 4785#0: 1024 worker_connections are not
enough
2013/02/15 16:30:39 [error] 4785#0: *1021 recv() failed (104: Connection
reset by peer) while reading response header from upstream, client:
127.0.0.1, server: localhost, request: “GET /info.php HTTP/1.0″,
upstream:
http://127.0.0.1:80/info.php”, host: “127.0.0.1″

Tried:

I’ve tried increasing the worker_connections to large numbers e.g. 19999
to
no avail.

Any tips?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,227162,236246#msg-236246

Hello!

On Sat, Feb 16, 2013 at 03:43:55AM -0500, youreright wrote:

Strange error for unused server?
127.0.0.1, server: localhost, request: “GET /info.php HTTP/1.0″, upstream:
http://127.0.0.1:80/info.php”, host: “127.0.0.1″

Tried:

I’ve tried increasing the worker_connections to large numbers e.g. 19999 to
no avail.

Any tips?

Error message (in particular, “127.0.0.1:80” as an upstream, and
“127.0.0.1” as a server) suggests you have proxy loop in your
configuration.


Maxim D.
http://nginx.com/support.html

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs