How to circumvent âToo many open filesâ in debian
Clash Royale CLAN TAG#URR8PPP
up vote
8
down vote
favorite
If I want to see all relevant log files of my apache2 server at once, I use
tail -f /var/kunden/logs/*log /var/kunden/logs/*log /var/log/apache2/*log |grep -v robots|grep -v favicon
But since those are too many files by now, I would like to encrease that limit.
How can I increase it for one ssh session? And How could I increase it globally systemwide?
I can see the open files limit is 1024 on my machine:
ulimit -n
1024
debian files limit file-descriptors ulimit
add a comment |Â
up vote
8
down vote
favorite
If I want to see all relevant log files of my apache2 server at once, I use
tail -f /var/kunden/logs/*log /var/kunden/logs/*log /var/log/apache2/*log |grep -v robots|grep -v favicon
But since those are too many files by now, I would like to encrease that limit.
How can I increase it for one ssh session? And How could I increase it globally systemwide?
I can see the open files limit is 1024 on my machine:
ulimit -n
1024
debian files limit file-descriptors ulimit
Exceeding the file limit is often a sign of a problem. As already noted, you may have a problem with log rotation. (Rotated log may drop off your command.) Outside /var/log/apache2 there shouldn't be many (any) logs related to your Apache server. Based on your grep pattern, you likely want to restrict your access to access logs.
â BillThor
Aug 4 '13 at 13:52
thanks for the hint, but my logrotaion works fine. I have so many logs, cause all 1025 domains on my server have their own log file ;)
â rubo77
Aug 4 '13 at 13:58
1
Your patterns look like they will also pick up error logs as well as access logs. This should be a minor issue if you have a single error log. If you leave this running in a shell, you may want to use-F
instead of-f
so logs get reopened when rotated.
â BillThor
Aug 4 '13 at 15:16
add a comment |Â
up vote
8
down vote
favorite
up vote
8
down vote
favorite
If I want to see all relevant log files of my apache2 server at once, I use
tail -f /var/kunden/logs/*log /var/kunden/logs/*log /var/log/apache2/*log |grep -v robots|grep -v favicon
But since those are too many files by now, I would like to encrease that limit.
How can I increase it for one ssh session? And How could I increase it globally systemwide?
I can see the open files limit is 1024 on my machine:
ulimit -n
1024
debian files limit file-descriptors ulimit
If I want to see all relevant log files of my apache2 server at once, I use
tail -f /var/kunden/logs/*log /var/kunden/logs/*log /var/log/apache2/*log |grep -v robots|grep -v favicon
But since those are too many files by now, I would like to encrease that limit.
How can I increase it for one ssh session? And How could I increase it globally systemwide?
I can see the open files limit is 1024 on my machine:
ulimit -n
1024
debian files limit file-descriptors ulimit
edited Aug 29 '13 at 23:15
pabouk
1,4961423
1,4961423
asked Aug 4 '13 at 2:58
rubo77
6,9802365124
6,9802365124
Exceeding the file limit is often a sign of a problem. As already noted, you may have a problem with log rotation. (Rotated log may drop off your command.) Outside /var/log/apache2 there shouldn't be many (any) logs related to your Apache server. Based on your grep pattern, you likely want to restrict your access to access logs.
â BillThor
Aug 4 '13 at 13:52
thanks for the hint, but my logrotaion works fine. I have so many logs, cause all 1025 domains on my server have their own log file ;)
â rubo77
Aug 4 '13 at 13:58
1
Your patterns look like they will also pick up error logs as well as access logs. This should be a minor issue if you have a single error log. If you leave this running in a shell, you may want to use-F
instead of-f
so logs get reopened when rotated.
â BillThor
Aug 4 '13 at 15:16
add a comment |Â
Exceeding the file limit is often a sign of a problem. As already noted, you may have a problem with log rotation. (Rotated log may drop off your command.) Outside /var/log/apache2 there shouldn't be many (any) logs related to your Apache server. Based on your grep pattern, you likely want to restrict your access to access logs.
â BillThor
Aug 4 '13 at 13:52
thanks for the hint, but my logrotaion works fine. I have so many logs, cause all 1025 domains on my server have their own log file ;)
â rubo77
Aug 4 '13 at 13:58
1
Your patterns look like they will also pick up error logs as well as access logs. This should be a minor issue if you have a single error log. If you leave this running in a shell, you may want to use-F
instead of-f
so logs get reopened when rotated.
â BillThor
Aug 4 '13 at 15:16
Exceeding the file limit is often a sign of a problem. As already noted, you may have a problem with log rotation. (Rotated log may drop off your command.) Outside /var/log/apache2 there shouldn't be many (any) logs related to your Apache server. Based on your grep pattern, you likely want to restrict your access to access logs.
â BillThor
Aug 4 '13 at 13:52
Exceeding the file limit is often a sign of a problem. As already noted, you may have a problem with log rotation. (Rotated log may drop off your command.) Outside /var/log/apache2 there shouldn't be many (any) logs related to your Apache server. Based on your grep pattern, you likely want to restrict your access to access logs.
â BillThor
Aug 4 '13 at 13:52
thanks for the hint, but my logrotaion works fine. I have so many logs, cause all 1025 domains on my server have their own log file ;)
â rubo77
Aug 4 '13 at 13:58
thanks for the hint, but my logrotaion works fine. I have so many logs, cause all 1025 domains on my server have their own log file ;)
â rubo77
Aug 4 '13 at 13:58
1
1
Your patterns look like they will also pick up error logs as well as access logs. This should be a minor issue if you have a single error log. If you leave this running in a shell, you may want to use
-F
instead of -f
so logs get reopened when rotated.â BillThor
Aug 4 '13 at 15:16
Your patterns look like they will also pick up error logs as well as access logs. This should be a minor issue if you have a single error log. If you leave this running in a shell, you may want to use
-F
instead of -f
so logs get reopened when rotated.â BillThor
Aug 4 '13 at 15:16
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
15
down vote
accepted
It is Important to know that there are two kinds of limits:
- A hard limit is configurable by root only. This is the highest possible value (limit) for the soft limit.
- A soft limit can be set by an ordinary user. This is the actual limit in effect.
Solution for a single session
In the shell set the soft limit:
ulimit -Sn 2048
This example will raise the actual limit to 2048 but the command will succeed only if the hard limit (check: ulimit -Hn
) is the same or higher. If you need higher values, raise the hard limit using one of the methods below. The limits are set per process and they are inherited by newly spawned processes, so anything you run after this command in the same shell will have the new limits.
Changing hard limit in a single session
This is not easy because only root can change a hard limit and after switching to root you have to switch back to the original user. Here is the solution with sudo
:
sudo sh -c "ulimit -Hn 9000 ; exec su "$USER""
System-wide solution
In Debian and many other systems using pam_limits
you can set the system-wide limits in /etc/security/limits.conf
and in files in /etc/security/limits.d
. The conf file contains description. Example lines:
@webadmins hard nofile 16384
@webadmins soft nofile 8192
This will set the hard limit and default soft limit for users in group webadmins
after login.
Other limits
The hard limit value is limited by global limit of open file descriptors value in /proc/sys/fs/file-max
which is pretty high by default in modern Linux distributions. This value is limited by NR_OPEN
value used during kernel compilation.
Is there not a better solution?
Maybe you could check if all the *log
files you feed to tail -f
are really active files which need to be monitored. It is possible that some of them are already closed for logging and you can just open a smaller number of files.
ulimit -Sn 4096 -bash: ulimit: open files: Kann die Grenze nicht ändern: Das Argument ist ungültig -- means the argument is not valid
â rubo77
Aug 4 '13 at 4:44
@rubo77: I added information about the hard limit which is most probably the cause of the problem.
â pabouk
Aug 4 '13 at 4:47
@rubo77: It is also possible to set the hard limit in a shell session but is it tricky as you have tosu
to root andsu
back to the user:su -c "ulimit -Hn 6000 ; su $USER"
â pabouk
Aug 4 '13 at 4:55
OK, so for a temporary change of the limit I will useulimit -Hn 6000; ulimit -Sn 6000
as root then
â rubo77
Aug 4 '13 at 13:02
1
@amenthes I guess you mean the configuration files in/etc/limits.*
. These limits are applied whenever the PAM modulepam_limits.so
is called. Normally it is at start of a session. For example in Ubuntu 14.04 it is in these tools / commands:cron
,login
(text console login),lightdm
(the GUI login),su
. You can set where ispam_limits
used in/etc/pam.*
. See for example: faqs.org/docs/securing/chap5sec44.html
â pabouk
Sep 23 '14 at 8:46
 |Â
show 3 more comments
up vote
0
down vote
I had the PHP Warning in my Apache error.log:
failed to open stream: Too many open files in ...
So I found out, apache sets this value individually while starting (on my Ubuntu 14.04). It is configured in /etc/apache2/envvars
. It says:
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
so I had to adjust the third line.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
15
down vote
accepted
It is Important to know that there are two kinds of limits:
- A hard limit is configurable by root only. This is the highest possible value (limit) for the soft limit.
- A soft limit can be set by an ordinary user. This is the actual limit in effect.
Solution for a single session
In the shell set the soft limit:
ulimit -Sn 2048
This example will raise the actual limit to 2048 but the command will succeed only if the hard limit (check: ulimit -Hn
) is the same or higher. If you need higher values, raise the hard limit using one of the methods below. The limits are set per process and they are inherited by newly spawned processes, so anything you run after this command in the same shell will have the new limits.
Changing hard limit in a single session
This is not easy because only root can change a hard limit and after switching to root you have to switch back to the original user. Here is the solution with sudo
:
sudo sh -c "ulimit -Hn 9000 ; exec su "$USER""
System-wide solution
In Debian and many other systems using pam_limits
you can set the system-wide limits in /etc/security/limits.conf
and in files in /etc/security/limits.d
. The conf file contains description. Example lines:
@webadmins hard nofile 16384
@webadmins soft nofile 8192
This will set the hard limit and default soft limit for users in group webadmins
after login.
Other limits
The hard limit value is limited by global limit of open file descriptors value in /proc/sys/fs/file-max
which is pretty high by default in modern Linux distributions. This value is limited by NR_OPEN
value used during kernel compilation.
Is there not a better solution?
Maybe you could check if all the *log
files you feed to tail -f
are really active files which need to be monitored. It is possible that some of them are already closed for logging and you can just open a smaller number of files.
ulimit -Sn 4096 -bash: ulimit: open files: Kann die Grenze nicht ändern: Das Argument ist ungültig -- means the argument is not valid
â rubo77
Aug 4 '13 at 4:44
@rubo77: I added information about the hard limit which is most probably the cause of the problem.
â pabouk
Aug 4 '13 at 4:47
@rubo77: It is also possible to set the hard limit in a shell session but is it tricky as you have tosu
to root andsu
back to the user:su -c "ulimit -Hn 6000 ; su $USER"
â pabouk
Aug 4 '13 at 4:55
OK, so for a temporary change of the limit I will useulimit -Hn 6000; ulimit -Sn 6000
as root then
â rubo77
Aug 4 '13 at 13:02
1
@amenthes I guess you mean the configuration files in/etc/limits.*
. These limits are applied whenever the PAM modulepam_limits.so
is called. Normally it is at start of a session. For example in Ubuntu 14.04 it is in these tools / commands:cron
,login
(text console login),lightdm
(the GUI login),su
. You can set where ispam_limits
used in/etc/pam.*
. See for example: faqs.org/docs/securing/chap5sec44.html
â pabouk
Sep 23 '14 at 8:46
 |Â
show 3 more comments
up vote
15
down vote
accepted
It is Important to know that there are two kinds of limits:
- A hard limit is configurable by root only. This is the highest possible value (limit) for the soft limit.
- A soft limit can be set by an ordinary user. This is the actual limit in effect.
Solution for a single session
In the shell set the soft limit:
ulimit -Sn 2048
This example will raise the actual limit to 2048 but the command will succeed only if the hard limit (check: ulimit -Hn
) is the same or higher. If you need higher values, raise the hard limit using one of the methods below. The limits are set per process and they are inherited by newly spawned processes, so anything you run after this command in the same shell will have the new limits.
Changing hard limit in a single session
This is not easy because only root can change a hard limit and after switching to root you have to switch back to the original user. Here is the solution with sudo
:
sudo sh -c "ulimit -Hn 9000 ; exec su "$USER""
System-wide solution
In Debian and many other systems using pam_limits
you can set the system-wide limits in /etc/security/limits.conf
and in files in /etc/security/limits.d
. The conf file contains description. Example lines:
@webadmins hard nofile 16384
@webadmins soft nofile 8192
This will set the hard limit and default soft limit for users in group webadmins
after login.
Other limits
The hard limit value is limited by global limit of open file descriptors value in /proc/sys/fs/file-max
which is pretty high by default in modern Linux distributions. This value is limited by NR_OPEN
value used during kernel compilation.
Is there not a better solution?
Maybe you could check if all the *log
files you feed to tail -f
are really active files which need to be monitored. It is possible that some of them are already closed for logging and you can just open a smaller number of files.
ulimit -Sn 4096 -bash: ulimit: open files: Kann die Grenze nicht ändern: Das Argument ist ungültig -- means the argument is not valid
â rubo77
Aug 4 '13 at 4:44
@rubo77: I added information about the hard limit which is most probably the cause of the problem.
â pabouk
Aug 4 '13 at 4:47
@rubo77: It is also possible to set the hard limit in a shell session but is it tricky as you have tosu
to root andsu
back to the user:su -c "ulimit -Hn 6000 ; su $USER"
â pabouk
Aug 4 '13 at 4:55
OK, so for a temporary change of the limit I will useulimit -Hn 6000; ulimit -Sn 6000
as root then
â rubo77
Aug 4 '13 at 13:02
1
@amenthes I guess you mean the configuration files in/etc/limits.*
. These limits are applied whenever the PAM modulepam_limits.so
is called. Normally it is at start of a session. For example in Ubuntu 14.04 it is in these tools / commands:cron
,login
(text console login),lightdm
(the GUI login),su
. You can set where ispam_limits
used in/etc/pam.*
. See for example: faqs.org/docs/securing/chap5sec44.html
â pabouk
Sep 23 '14 at 8:46
 |Â
show 3 more comments
up vote
15
down vote
accepted
up vote
15
down vote
accepted
It is Important to know that there are two kinds of limits:
- A hard limit is configurable by root only. This is the highest possible value (limit) for the soft limit.
- A soft limit can be set by an ordinary user. This is the actual limit in effect.
Solution for a single session
In the shell set the soft limit:
ulimit -Sn 2048
This example will raise the actual limit to 2048 but the command will succeed only if the hard limit (check: ulimit -Hn
) is the same or higher. If you need higher values, raise the hard limit using one of the methods below. The limits are set per process and they are inherited by newly spawned processes, so anything you run after this command in the same shell will have the new limits.
Changing hard limit in a single session
This is not easy because only root can change a hard limit and after switching to root you have to switch back to the original user. Here is the solution with sudo
:
sudo sh -c "ulimit -Hn 9000 ; exec su "$USER""
System-wide solution
In Debian and many other systems using pam_limits
you can set the system-wide limits in /etc/security/limits.conf
and in files in /etc/security/limits.d
. The conf file contains description. Example lines:
@webadmins hard nofile 16384
@webadmins soft nofile 8192
This will set the hard limit and default soft limit for users in group webadmins
after login.
Other limits
The hard limit value is limited by global limit of open file descriptors value in /proc/sys/fs/file-max
which is pretty high by default in modern Linux distributions. This value is limited by NR_OPEN
value used during kernel compilation.
Is there not a better solution?
Maybe you could check if all the *log
files you feed to tail -f
are really active files which need to be monitored. It is possible that some of them are already closed for logging and you can just open a smaller number of files.
It is Important to know that there are two kinds of limits:
- A hard limit is configurable by root only. This is the highest possible value (limit) for the soft limit.
- A soft limit can be set by an ordinary user. This is the actual limit in effect.
Solution for a single session
In the shell set the soft limit:
ulimit -Sn 2048
This example will raise the actual limit to 2048 but the command will succeed only if the hard limit (check: ulimit -Hn
) is the same or higher. If you need higher values, raise the hard limit using one of the methods below. The limits are set per process and they are inherited by newly spawned processes, so anything you run after this command in the same shell will have the new limits.
Changing hard limit in a single session
This is not easy because only root can change a hard limit and after switching to root you have to switch back to the original user. Here is the solution with sudo
:
sudo sh -c "ulimit -Hn 9000 ; exec su "$USER""
System-wide solution
In Debian and many other systems using pam_limits
you can set the system-wide limits in /etc/security/limits.conf
and in files in /etc/security/limits.d
. The conf file contains description. Example lines:
@webadmins hard nofile 16384
@webadmins soft nofile 8192
This will set the hard limit and default soft limit for users in group webadmins
after login.
Other limits
The hard limit value is limited by global limit of open file descriptors value in /proc/sys/fs/file-max
which is pretty high by default in modern Linux distributions. This value is limited by NR_OPEN
value used during kernel compilation.
Is there not a better solution?
Maybe you could check if all the *log
files you feed to tail -f
are really active files which need to be monitored. It is possible that some of them are already closed for logging and you can just open a smaller number of files.
edited Jun 12 '17 at 3:52
Tshepang
24.7k68179260
24.7k68179260
answered Aug 4 '13 at 4:37
pabouk
1,4961423
1,4961423
ulimit -Sn 4096 -bash: ulimit: open files: Kann die Grenze nicht ändern: Das Argument ist ungültig -- means the argument is not valid
â rubo77
Aug 4 '13 at 4:44
@rubo77: I added information about the hard limit which is most probably the cause of the problem.
â pabouk
Aug 4 '13 at 4:47
@rubo77: It is also possible to set the hard limit in a shell session but is it tricky as you have tosu
to root andsu
back to the user:su -c "ulimit -Hn 6000 ; su $USER"
â pabouk
Aug 4 '13 at 4:55
OK, so for a temporary change of the limit I will useulimit -Hn 6000; ulimit -Sn 6000
as root then
â rubo77
Aug 4 '13 at 13:02
1
@amenthes I guess you mean the configuration files in/etc/limits.*
. These limits are applied whenever the PAM modulepam_limits.so
is called. Normally it is at start of a session. For example in Ubuntu 14.04 it is in these tools / commands:cron
,login
(text console login),lightdm
(the GUI login),su
. You can set where ispam_limits
used in/etc/pam.*
. See for example: faqs.org/docs/securing/chap5sec44.html
â pabouk
Sep 23 '14 at 8:46
 |Â
show 3 more comments
ulimit -Sn 4096 -bash: ulimit: open files: Kann die Grenze nicht ändern: Das Argument ist ungültig -- means the argument is not valid
â rubo77
Aug 4 '13 at 4:44
@rubo77: I added information about the hard limit which is most probably the cause of the problem.
â pabouk
Aug 4 '13 at 4:47
@rubo77: It is also possible to set the hard limit in a shell session but is it tricky as you have tosu
to root andsu
back to the user:su -c "ulimit -Hn 6000 ; su $USER"
â pabouk
Aug 4 '13 at 4:55
OK, so for a temporary change of the limit I will useulimit -Hn 6000; ulimit -Sn 6000
as root then
â rubo77
Aug 4 '13 at 13:02
1
@amenthes I guess you mean the configuration files in/etc/limits.*
. These limits are applied whenever the PAM modulepam_limits.so
is called. Normally it is at start of a session. For example in Ubuntu 14.04 it is in these tools / commands:cron
,login
(text console login),lightdm
(the GUI login),su
. You can set where ispam_limits
used in/etc/pam.*
. See for example: faqs.org/docs/securing/chap5sec44.html
â pabouk
Sep 23 '14 at 8:46
ulimit -Sn 4096 -bash: ulimit: open files: Kann die Grenze nicht ändern: Das Argument ist ungültig -- means the argument is not valid
â rubo77
Aug 4 '13 at 4:44
ulimit -Sn 4096 -bash: ulimit: open files: Kann die Grenze nicht ändern: Das Argument ist ungültig -- means the argument is not valid
â rubo77
Aug 4 '13 at 4:44
@rubo77: I added information about the hard limit which is most probably the cause of the problem.
â pabouk
Aug 4 '13 at 4:47
@rubo77: I added information about the hard limit which is most probably the cause of the problem.
â pabouk
Aug 4 '13 at 4:47
@rubo77: It is also possible to set the hard limit in a shell session but is it tricky as you have to
su
to root and su
back to the user: su -c "ulimit -Hn 6000 ; su $USER"
â pabouk
Aug 4 '13 at 4:55
@rubo77: It is also possible to set the hard limit in a shell session but is it tricky as you have to
su
to root and su
back to the user: su -c "ulimit -Hn 6000 ; su $USER"
â pabouk
Aug 4 '13 at 4:55
OK, so for a temporary change of the limit I will use
ulimit -Hn 6000; ulimit -Sn 6000
as root thenâ rubo77
Aug 4 '13 at 13:02
OK, so for a temporary change of the limit I will use
ulimit -Hn 6000; ulimit -Sn 6000
as root thenâ rubo77
Aug 4 '13 at 13:02
1
1
@amenthes I guess you mean the configuration files in
/etc/limits.*
. These limits are applied whenever the PAM module pam_limits.so
is called. Normally it is at start of a session. For example in Ubuntu 14.04 it is in these tools / commands: cron
, login
(text console login), lightdm
(the GUI login), su
. You can set where is pam_limits
used in /etc/pam.*
. See for example: faqs.org/docs/securing/chap5sec44.htmlâ pabouk
Sep 23 '14 at 8:46
@amenthes I guess you mean the configuration files in
/etc/limits.*
. These limits are applied whenever the PAM module pam_limits.so
is called. Normally it is at start of a session. For example in Ubuntu 14.04 it is in these tools / commands: cron
, login
(text console login), lightdm
(the GUI login), su
. You can set where is pam_limits
used in /etc/pam.*
. See for example: faqs.org/docs/securing/chap5sec44.htmlâ pabouk
Sep 23 '14 at 8:46
 |Â
show 3 more comments
up vote
0
down vote
I had the PHP Warning in my Apache error.log:
failed to open stream: Too many open files in ...
So I found out, apache sets this value individually while starting (on my Ubuntu 14.04). It is configured in /etc/apache2/envvars
. It says:
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
so I had to adjust the third line.
add a comment |Â
up vote
0
down vote
I had the PHP Warning in my Apache error.log:
failed to open stream: Too many open files in ...
So I found out, apache sets this value individually while starting (on my Ubuntu 14.04). It is configured in /etc/apache2/envvars
. It says:
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
so I had to adjust the third line.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I had the PHP Warning in my Apache error.log:
failed to open stream: Too many open files in ...
So I found out, apache sets this value individually while starting (on my Ubuntu 14.04). It is configured in /etc/apache2/envvars
. It says:
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
so I had to adjust the third line.
I had the PHP Warning in my Apache error.log:
failed to open stream: Too many open files in ...
So I found out, apache sets this value individually while starting (on my Ubuntu 14.04). It is configured in /etc/apache2/envvars
. It says:
## If you need a higher file descriptor limit, uncomment and adjust the
## following line (default is 8192):
#APACHE_ULIMIT_MAX_FILES='ulimit -n 65536'
so I had to adjust the third line.
edited Jun 2 '15 at 11:11
rubo77
6,9802365124
6,9802365124
answered Jun 2 '15 at 11:01
Michael
1
1
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f85457%2fhow-to-circumvent-too-many-open-files-in-debian%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Exceeding the file limit is often a sign of a problem. As already noted, you may have a problem with log rotation. (Rotated log may drop off your command.) Outside /var/log/apache2 there shouldn't be many (any) logs related to your Apache server. Based on your grep pattern, you likely want to restrict your access to access logs.
â BillThor
Aug 4 '13 at 13:52
thanks for the hint, but my logrotaion works fine. I have so many logs, cause all 1025 domains on my server have their own log file ;)
â rubo77
Aug 4 '13 at 13:58
1
Your patterns look like they will also pick up error logs as well as access logs. This should be a minor issue if you have a single error log. If you leave this running in a shell, you may want to use
-F
instead of-f
so logs get reopened when rotated.â BillThor
Aug 4 '13 at 15:16