Opened 12 years ago

Closed 12 years ago

#37173 closed defect (worksforme)

nginx from macports causes 'kernel[0]: proc: table is full'

Reported by: daniel.plainv@… Owned by: neverpanic (Clemens Lang)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: nginx

Description

Since I installed nginx from macports, I have sometimes this issue:

Nov 30 16:10:48 hellyeah com.apple.launchd[1] (org.macports.nginx[2338]): Exited with code: 2
Nov 30 16:11:19 hellyeah com.apple.launchd[1] (org.macports.nginx[2349]): Exited with code: 2
Nov 30 16:11:49 hellyeah com.apple.launchd[1] (org.macports.nginx[2359]): Exited with code: 2
Nov 30 16:12:19 hellyeah com.apple.launchd[1] (org.macports.nginx[2366]): Exited with code: 2
Nov 30 16:12:49 hellyeah com.apple.launchd[1] (org.macports.nginx[2373]): Exited with code: 2
Nov 30 16:13:19 hellyeah com.apple.launchd[1] (org.macports.nginx[2380]): Exited with code: 2
Nov 30 16:13:49 hellyeah com.apple.launchd[1] (org.macports.nginx[2387]): Exited with code: 2
Nov 30 16:13:49 hellyeah kernel[0]: proc: table is full
Nov 30 16:14:19 --- last message repeated 2 times ---
Nov 30 16:14:19 hellyeah com.apple.launchd[1] (org.macports.nginx[2395]): Exited with code: 2
Nov 30 16:14:19 hellyeah kernel[0]: proc: table is full
Nov 30 16:14:26 hellyeah com.apple.launchd.peruser.89[354] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:26 hellyeah com.apple.launchd.peruser.501[258] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:26 hellyeah kernel[0]: proc: table is full
Nov 30 16:14:27 --- last message repeated 1 time ---
Nov 30 16:14:27 hellyeah com.apple.launchd.peruser.501[258] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:27 hellyeah com.apple.launchd.peruser.89[354] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:27 hellyeah kernel[0]: proc: table is full
Nov 30 16:14:28 --- last message repeated 1 time ---
Nov 30 16:14:28 hellyeah com.apple.launchd.peruser.501[258] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:28 hellyeah com.apple.launchd.peruser.89[354] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:28 hellyeah kernel[0]: proc: table is full
Nov 30 16:14:29 --- last message repeated 1 time ---
Nov 30 16:14:29 hellyeah com.apple.launchd.peruser.89[354] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:29 hellyeah com.apple.launchd.peruser.501[258] (com.apple.mdworker.bundles): fork() failed, will try again in one second: 35: Resource temporarily unavailable
Nov 30 16:14:29 hellyeah kernel[0]: proc: table is full
Nov 30 16:14:30 --- last message repeated 1 time ---

and system becomes unusable: I can't run any new application including Terminal and proc table remains full.

I'm not sure, but it seems like nginx port is bugged.

Change History (7)

comment:1 Changed 12 years ago by mf2k (Frank Schima)

Keywords: nginx forks removed
Owner: changed from macports-tickets@… to cal@…

In the future, please Cc the port maintainer(s).

comment:2 Changed 12 years ago by daniel.plainv@…

By the way, is it OK that logs of nginx weren't removed after uninstalling port?

hellyeah:~ xxx$ ls -la /var/log/nginx/
total 0
drwxr-xr-x   4 root  wheel   136 25 ноя 05:17 .
drwxr-xr-x  67 root  wheel  2278  3 дек 23:52 ..
-rw-r--r--   1 root  wheel     0 25 ноя 05:17 access.log
-rw-r--r--   1 root  wheel     0 25 ноя 05:17 error.log

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Yes, it is normal that logs and configuration files are not removed when uninstalling a port. Such files contain potentially irreplaceable information so it should be up to the user to delete them if and when desired.

comment:4 Changed 12 years ago by neverpanic (Clemens Lang)

I cannot reproduce your problem. Which variants did you use when installing nginx? Can you provide your nginx.conf?

comment:5 Changed 12 years ago by daniel.plainv@…

Where are nginx logs? /etc/nginx/ doesn't exist. I'm not sure, but probably I didn't even create such dir.

Well, I'll install this port later again and where should I look if I face with such issue?

Version 0, edited 12 years ago by daniel.plainv@… (next)

comment:6 Changed 12 years ago by daniel.plainv@…

Where are nginx logs? /etc/nginx/ doesn't exist

Argh, for sure I meant config.

comment:7 Changed 12 years ago by neverpanic (Clemens Lang)

Resolution: worksforme
Status: newclosed

The configuration files are in /opt/local/etc/nginx, if your prefix is /opt/local. The MacPorts nginx package does not install a configuration file, but only an example of it. You need to copy the example configuration file and adjust it. Since you apparently never did this, all the nginx port does when started is print an error message and exit. If you started nginx using sudo port load nginx you would get a log message every 30 seconds telling you that launchd couldn't start nginx (which is what you saw).

However, this should not fill the kernel process table, because at any given time, at most a daemondo process and a zombie process of what used to be an nginx process are around. As soon as daemondo exits, launchd should have cleaned up the zombie. If this didn't happen in your case, it would explain the problem.

Anyway, create a working nginx configuration before starting it. I have added a message detailing this in r100667.

Note: See TracTickets for help on using tickets.