You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "D'Arcy J.M. Cain" <da...@Vex.Net> on 2013/02/25 18:03:07 UTC
[users@httpd] Unable to open logs - but NOT a permission problem
I have been scouring the net for my specific issue. All the responses
suggest that either the file permissions are wrong or that the ulimit
is set too low. I know that neither of these is my problem because
Apache starts at boot and sometimes restarts while the server is
running. While it is running I seem to be able to kill -1 as often as
I want.
However, if the server stops for any reason, there is a good chance
that it won't restart and gives me the "unable to open logs" message.
I am running NetBSD 5.1. Here is some info from sysctl relating to
number of files:
kern.maxfiles = 52364
proc.curproc.rlimit.filesize.soft = unlimited
proc.curproc.rlimit.filesize.hard = unlimited
An fstat | wc -l gives numbers an order of magnitude below maxfiles.
Currently, even with Apache running, it is sitting at 7638. When I try
to restart my ulimit is unlimited.
Here is my memory usage currently.
MemTotal: 16252760 kB
MemFree: 14894768 kB
MemShared: 0 kB
Buffers: 304496 kB
Cached: 799904 kB
SwapTotal: 8389548 kB
SwapFree: 8389548 kB
Here is more information about my system:
NetBSD 5.1 (VEX) #0: Sun Oct 21 09:19:41 EDT 2012
door@gollum.vex.net:/usr/obj/sys/arch/amd64/compile.amd64/VEX
total memory = 16382 MB
avail memory = 15868 MB
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
SMBIOS rev. 2.31 @ 0xdc010 (57 entries)
HP ProLiant DL140 G3 (436602-001)
mainbus0 (root)
cpu0 at mainbus0 apid 0: Intel 686-class, 2992MHz, id 0xf64
cpu1 at mainbus0 apid 4: Intel 686-class, 2992MHz, id 0xf64
cpu2 at mainbus0 apid 2: Intel 686-class, 2992MHz, id 0xf64
cpu3 at mainbus0 apid 6: Intel 686-class, 2992MHz, id 0xf64
cpu4 at mainbus0 apid 1: Intel 686-class, 2992MHz, id 0xf64
cpu5 at mainbus0 apid 5: Intel 686-class, 2992MHz, id 0xf64
cpu6 at mainbus0 apid 3: Intel 686-class, 2992MHz, id 0xf64
cpu7 at mainbus0 apid 7: Intel 686-class, 2992MHz, id 0xf64
As for log permissions, here are all the files and directories,
including parents, with today's timestamps.
-rw-r--r-- 1 root wheel 5955946 Feb 25 00:00 suexec.log.2013.02.25
drwxr-xr-x 2 root wheel 3584 Feb 25 00:00 .
drwxr-xr-x 4 root wheel 7168 Feb 25 00:00 ..
-rw-r--r-- 1 root wheel 23050427 Feb 25 00:00 access.2013.02.25
-rw-r--r-- 1 root wheel 7462145 Feb 25 00:00 error.2013.02.25
-rw-r--r-- 1 root wheel 1825540 Feb 25 11:50 error
-rw-r--r-- 1 root wheel 3246059 Feb 25 11:51 suexec.log
-rw-r--r-- 1 root wheel 5245858 Feb 25 11:51 access
As you can see I am running suExec but this problem happened before I
implemented that. In fact, suExec allowed me to run one server instead
of multiple ones. I was hoping that it would solve my problem by
reducing resource usage but no joy.
I can't imaging what other information I can supply here but if you
need more please let me know. This machine takes five minutes to
reboot so I would really like a way that does not involve booting.
Any help really appreciated.
--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
Voip: sip:darcy@Vex.Net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Unable to open logs - but NOT a permission
problem
Posted by "D'Arcy J.M. Cain" <da...@Vex.Net>.
On Tue, 26 Feb 2013 08:32:36 +1000
Brett Maxfield <br...@gmail.com> wrote:
> If apache can write everything on start, and then it becomes
> unresponsive, that sounds like file handles / inodes. There wont be
> errors as likely the thread with the problem can't write logs..
No, as long as I don't touch it, it runs fine. I can even "kill -1" to
update a config and it is still fine. The problem only happens when I
stop the server (or it stops when I "kill -1" and there is a config
error) and then try to restart it. The only solution seems to be a
system reboot.
> But if apache locks up hard, due to no inodes, or something else, you
Again, this is not my issue.
I'm not sure why my first message was so misunderstood. Did I offer
so much detail that people didn't take the time to read it? Let me
summarize if I can.
10 Apache runs fine after a reboot
20 I can "kill -1" as long as I didn't FU the configs
30 If I don't touch it, Apache continues to run fine
40 If I stop and restart Apache it gets the error.
50 GOTO 10
--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
Voip: sip:darcy@Vex.Net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Unable to open logs - but NOT a permission problem
Posted by Brett Maxfield <br...@gmail.com>.
If apache can write everything on start, and then it becomes unresponsive, that sounds like file handles / inodes. There wont be errors as likely the thread with the problem can't write logs..
But if apache locks up hard, due to no inodes, or something else, you wont kill it with a kill -1, and the process that runs it will own the files. And no other apache will be able to access them, regardless of permissions.
On 26/02/2013, at 3:03 AM, "D'Arcy J.M. Cain" <da...@Vex.Net> wrote:
> I have been scouring the net for my specific issue. All the responses
> suggest that either the file permissions are wrong or that the ulimit
> is set too low. I know that neither of these is my problem because
> Apache starts at boot and sometimes restarts while the server is
> running. While it is running I seem to be able to kill -1 as often as
> I want.
>
> However, if the server stops for any reason, there is a good chance
> that it won't restart and gives me the "unable to open logs" message.
>
> I am running NetBSD 5.1. Here is some info from sysctl relating to
> number of files:
> kern.maxfiles = 52364
> proc.curproc.rlimit.filesize.soft = unlimited
> proc.curproc.rlimit.filesize.hard = unlimited
>
> An fstat | wc -l gives numbers an order of magnitude below maxfiles.
> Currently, even with Apache running, it is sitting at 7638. When I try
> to restart my ulimit is unlimited.
>
> Here is my memory usage currently.
> MemTotal: 16252760 kB
> MemFree: 14894768 kB
> MemShared: 0 kB
> Buffers: 304496 kB
> Cached: 799904 kB
> SwapTotal: 8389548 kB
> SwapFree: 8389548 kB
>
>
> Here is more information about my system:
> NetBSD 5.1 (VEX) #0: Sun Oct 21 09:19:41 EDT 2012
> door@gollum.vex.net:/usr/obj/sys/arch/amd64/compile.amd64/VEX
> total memory = 16382 MB
> avail memory = 15868 MB
> timecounter: Timecounters tick every 10.000 msec
> timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
> SMBIOS rev. 2.31 @ 0xdc010 (57 entries)
> HP ProLiant DL140 G3 (436602-001)
> mainbus0 (root)
> cpu0 at mainbus0 apid 0: Intel 686-class, 2992MHz, id 0xf64
> cpu1 at mainbus0 apid 4: Intel 686-class, 2992MHz, id 0xf64
> cpu2 at mainbus0 apid 2: Intel 686-class, 2992MHz, id 0xf64
> cpu3 at mainbus0 apid 6: Intel 686-class, 2992MHz, id 0xf64
> cpu4 at mainbus0 apid 1: Intel 686-class, 2992MHz, id 0xf64
> cpu5 at mainbus0 apid 5: Intel 686-class, 2992MHz, id 0xf64
> cpu6 at mainbus0 apid 3: Intel 686-class, 2992MHz, id 0xf64
> cpu7 at mainbus0 apid 7: Intel 686-class, 2992MHz, id 0xf64
>
> As for log permissions, here are all the files and directories,
> including parents, with today's timestamps.
> -rw-r--r-- 1 root wheel 5955946 Feb 25 00:00 suexec.log.2013.02.25
> drwxr-xr-x 2 root wheel 3584 Feb 25 00:00 .
> drwxr-xr-x 4 root wheel 7168 Feb 25 00:00 ..
> -rw-r--r-- 1 root wheel 23050427 Feb 25 00:00 access.2013.02.25
> -rw-r--r-- 1 root wheel 7462145 Feb 25 00:00 error.2013.02.25
> -rw-r--r-- 1 root wheel 1825540 Feb 25 11:50 error
> -rw-r--r-- 1 root wheel 3246059 Feb 25 11:51 suexec.log
> -rw-r--r-- 1 root wheel 5245858 Feb 25 11:51 access
>
> As you can see I am running suExec but this problem happened before I
> implemented that. In fact, suExec allowed me to run one server instead
> of multiple ones. I was hoping that it would solve my problem by
> reducing resource usage but no joy.
>
> I can't imaging what other information I can supply here but if you
> need more please let me know. This machine takes five minutes to
> reboot so I would really like a way that does not involve booting.
>
> Any help really appreciated.
>
> --
> D'Arcy J.M. Cain
> System Administrator, Vex.Net
> http://www.Vex.Net/ IM:darcy@Vex.Net
> Voip: sip:darcy@Vex.Net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Unable to open logs - but NOT a permission
problem
Posted by "D'Arcy J.M. Cain" <da...@Vex.Net>.
On Mon, 25 Feb 2013 14:48:10 -0500
Ben Johnson <be...@indietorrent.org> wrote:
> I do find it curious that your logs are so well-populated (error and
> suexec.log, in particular), but that's probably unrelated to the
> "unable to open logs" error.
It would be nice to just see errors in the suexec log.
> Does the syslog reveal anything useful?
Which one?
> Finally, your remarks seem to imply that Apache restarts all on its
> own from time to time.
Sorry, didn't mean to imply that . Sometimes, especially now while I
am fine tuning 2.4 and suexec, I need to restart it. If I kill -1 it
works fine unless I made a config error and then I have to start it
again after fixing the error. That's when the problem happens. There
are no mysterious gremlins randomly stopping Apache. It's always me,
an overfed long haired leaping gnome, that stops it.
> > Apache starts at boot and sometimes restarts while the server is
> > running.
By which I mean that it always starts at boot time and if I have to
restart it (i.e Apache) while the server (i.e. the computer, not
Apache) is running, sometimes it restarts and sometimes it doesn't.
--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.Net/ IM:darcy@Vex.Net
Voip: sip:darcy@Vex.Net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] Unable to open logs - but NOT a permission problem
Posted by Ben Johnson <be...@indietorrent.org>.
On 2/25/2013 12:03 PM, D'Arcy J.M. Cain wrote:
> I have been scouring the net for my specific issue. All the responses
> suggest that either the file permissions are wrong or that the ulimit
> is set too low. I know that neither of these is my problem because
> Apache starts at boot and sometimes restarts while the server is
> running. While it is running I seem to be able to kill -1 as often as
> I want.
>
> However, if the server stops for any reason, there is a good chance
> that it won't restart and gives me the "unable to open logs" message.
>
> I am running NetBSD 5.1. Here is some info from sysctl relating to
> number of files:
> kern.maxfiles = 52364
> proc.curproc.rlimit.filesize.soft = unlimited
> proc.curproc.rlimit.filesize.hard = unlimited
>
> An fstat | wc -l gives numbers an order of magnitude below maxfiles.
> Currently, even with Apache running, it is sitting at 7638. When I try
> to restart my ulimit is unlimited.
>
> Here is my memory usage currently.
> MemTotal: 16252760 kB
> MemFree: 14894768 kB
> MemShared: 0 kB
> Buffers: 304496 kB
> Cached: 799904 kB
> SwapTotal: 8389548 kB
> SwapFree: 8389548 kB
>
>
> Here is more information about my system:
> NetBSD 5.1 (VEX) #0: Sun Oct 21 09:19:41 EDT 2012
> door@gollum.vex.net:/usr/obj/sys/arch/amd64/compile.amd64/VEX
> total memory = 16382 MB
> avail memory = 15868 MB
> timecounter: Timecounters tick every 10.000 msec
> timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
> SMBIOS rev. 2.31 @ 0xdc010 (57 entries)
> HP ProLiant DL140 G3 (436602-001)
> mainbus0 (root)
> cpu0 at mainbus0 apid 0: Intel 686-class, 2992MHz, id 0xf64
> cpu1 at mainbus0 apid 4: Intel 686-class, 2992MHz, id 0xf64
> cpu2 at mainbus0 apid 2: Intel 686-class, 2992MHz, id 0xf64
> cpu3 at mainbus0 apid 6: Intel 686-class, 2992MHz, id 0xf64
> cpu4 at mainbus0 apid 1: Intel 686-class, 2992MHz, id 0xf64
> cpu5 at mainbus0 apid 5: Intel 686-class, 2992MHz, id 0xf64
> cpu6 at mainbus0 apid 3: Intel 686-class, 2992MHz, id 0xf64
> cpu7 at mainbus0 apid 7: Intel 686-class, 2992MHz, id 0xf64
>
> As for log permissions, here are all the files and directories,
> including parents, with today's timestamps.
> -rw-r--r-- 1 root wheel 5955946 Feb 25 00:00 suexec.log.2013.02.25
> drwxr-xr-x 2 root wheel 3584 Feb 25 00:00 .
> drwxr-xr-x 4 root wheel 7168 Feb 25 00:00 ..
> -rw-r--r-- 1 root wheel 23050427 Feb 25 00:00 access.2013.02.25
> -rw-r--r-- 1 root wheel 7462145 Feb 25 00:00 error.2013.02.25
> -rw-r--r-- 1 root wheel 1825540 Feb 25 11:50 error
> -rw-r--r-- 1 root wheel 3246059 Feb 25 11:51 suexec.log
> -rw-r--r-- 1 root wheel 5245858 Feb 25 11:51 access
>
> As you can see I am running suExec but this problem happened before I
> implemented that. In fact, suExec allowed me to run one server instead
> of multiple ones. I was hoping that it would solve my problem by
> reducing resource usage but no joy.
>
> I can't imaging what other information I can supply here but if you
> need more please let me know. This machine takes five minutes to
> reboot so I would really like a way that does not involve booting.
>
> Any help really appreciated.
>
I do find it curious that your logs are so well-populated (error and
suexec.log, in particular), but that's probably unrelated to the "unable
to open logs" error.
Does the syslog reveal anything useful?
Finally, your remarks seem to imply that Apache restarts all on its own
from time to time.
> Apache starts at boot and sometimes restarts while the server is
> running.
That's not normal (as you may have surmised), nor is there any automated
mechanism of which I'm aware that would restart Apache as it sees fit.
One would expect to see information that is relevant to these
intermittent Apache restarts in Apache's error log.
-Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org