Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
03-02-2010, 06:26 PM
|
#1
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Rep:
|
Apache2 EnableSendfile & Error :: Broken pipe: core_output_filter
Hi everyone,
My name is Jonathan, junior web developer/server admin for my company. Quite inexperienced with Linux problems, I come to seek some help and advice from you.
I have installed a LAMP server (Debian Lenny + Apache2 + PHP Version 5.3.1-0.dotdeb.1). On this machine, my web application (PHP + MySQL) exists in 2 flavours:
- Dev
- Prod
In /etc/apache2/sites-available, I have ims & ims-dev, one for each instance.
Their contents are identical in terms of settings, except for the paths (dev/prod):
Code:
<VirtualHost *:80>
ServerAdmin admin@domain.com
ServerName ims.domain.com
ServerAlias ims.domain.com
DocumentRoot /var/www/ims/public_html/prod/
FileETag none
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
# Set up caching on files for 1 year (forever?)
<FilesMatch "\.(jpg|png|jpeg|gif|ico|pdf|js|css)$">
ExpiresDefault A29030400
Header append Cache-Control "public"
</FilesMatch>
<Location />
# Insert filter
SetOutputFilter DEFLATE
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</Location>
<Directory /var/www/ims/public_html/prod/>
Order allow,deny
Allow from all
php_admin_value open_basedir "/var/www/ims/public_html/prod/:/tmp"
php_admin_value error_log "/var/www/ims/public_html/logs/error.php.ims.log"
php_admin_value include_path ".;/var/www/ims/public_html/prod/"
</Directory>
ErrorLog /var/www/ims/public_html/logs/error.ims.log
CustomLog /var/www/ims/public_html/logs/access.ims.log combined
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options Indexes FollowSymLinks
DirectoryIndex index.php
Order allow,deny
Allow from all
<Files setup.php>
Order allow,deny
Deny from all
</Files>
</Directory>
</VirtualHost>
My problem is in the file error.ims.log where I have :
Code:
[Wed Mar 03 10:22:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Mar 03 10:25:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Mar 03 10:28:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Mar 03 10:31:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Mar 03 10:37:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Mar 03 10:43:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Mar 03 10:46:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Wed Mar 03 10:49:50 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
As you can see, this error happens periodically every 3 minutes during 15 minutes, then after 6 minutes, and again, and again, and again. The sequence is: 3 - 3 - 3 - 3 - 3 - 6 etc...
Not only is this making the log file growing unnecessarily (which is already bad), but this error doesn't occur in the file error.ims_dev.log of the dev instance.
Does anyone know why this difference when the settings are strictly identical?
Do I need to add EnableSendfile off in my conf files to stop that?
Thank you for your help and answers.
Cheers,
Jonathan
Last edited by johnsan; 03-02-2010 at 06:27 PM.
|
|
|
03-03-2010, 01:40 PM
|
#2
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
|
Quote:
As you can see, this error happens periodically every 3 minutes during 15 minutes, then after 6 minutes, and again, and again, and again. The sequence is: 3 - 3 - 3 - 3 - 3 - 6 etc...
|
To me it looks like a problem with mod_expires. I guess the page expires before being sent completely.
Turn if off (or at lest change "ExpiresDefault A0" to "ExpiresDefault A3600") and see if it helps
Quote:
Do I need to add EnableSendfile off in my conf files to stop that?
|
You can try it just in case.
Regards
|
|
|
03-03-2010, 04:22 PM
|
#3
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Original Poster
Rep:
|
Thanks Bathory for your reply.
I just applied the 2 commands to my conf files:
- ExpiresDefault A3600 instead of ExpiresDefault A0
- EnableSendfile off
... and the problem still occurs. So I guess it is something else.
Last edited by johnsan; 03-03-2010 at 04:37 PM.
|
|
|
03-03-2010, 05:45 PM
|
#4
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
|
Doh, change the log level to debug
and see if you get anything more in logs.
What is the difference in content between prod and dev?
|
|
|
03-03-2010, 06:24 PM
|
#5
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Original Poster
Rep:
|
I just changed the log level to debug.
Please find below the output of the log file:
Code:
[Thu Mar 04 11:10:59 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Thu Mar 04 11:16:59 2010] [debug] mod_headers.c(740): headers: ap_headers_output_filter()
[Thu Mar 04 11:16:59 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Thu Mar 04 11:19:59 2010] [debug] mod_headers.c(740): headers: ap_headers_output_filter()
[Thu Mar 04 11:19:59 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
The difference between Dev & Prod is essentially the php files. I develop my code locally using EasyPHP. Then I upload the php files on the server in the Dev environment to make sure that the new code runs nicely (no bug or horrible behavior) and doesn't destroy any data. When it's tested, I upload the files in the Prod environment.
|
|
|
03-04-2010, 12:26 AM
|
#6
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
|
Well logs don't say much.
Are you experiencing any timeouts when visiting the site? Also does this happen when you visit the site from another computer or it happens only for localhost (there is only 127.0.0.1 in the logs)?
Maybe you can disable memory-mapping along with sendfile for the vhost:
Code:
EnableSendfile Off
EnableMMAP Off
Regards
|
|
|
03-04-2010, 12:31 AM
|
#7
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Original Poster
Rep:
|
I removed the LogLevel Debug to avoid a massive log (ok still small but you never know).
I just added EnableMMAP Off right after EnableSendfile Off. I will see tomorrow what the log says.
By the way, I did place those 2 instructions right below FileETag none. Is it a correct place ?
Thanks for your help Bathory !
|
|
|
03-04-2010, 12:51 AM
|
#8
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,223
|
Quote:
By the way, I did place those 2 instructions right below FileETag none. Is it a correct place ?
|
It's ok.
You didn't answer if you encounter any delays/timeouts?
Cheers
|
|
|
03-04-2010, 01:34 AM
|
#9
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Original Poster
Rep:
|
Oups, forgot to answer that question.
No particular delays or timeouts.
|
|
|
03-04-2010, 04:25 PM
|
#10
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Original Poster
Rep:
|
Hi Bathory,
Looking at the logs this morning, I still have the error messages, but as you will notice, the frequency has changed:
Code:
[Fri Mar 05 08:41:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 08:44:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 08:47:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 08:50:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 08:59:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 09:05:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 09:08:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 09:14:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
[Fri Mar 05 09:17:06 2010] [info] [client 127.0.0.1] (32)Broken pipe: core_output_filter: writing data to the network
|
|
|
03-13-2010, 10:27 AM
|
#11
|
LQ Newbie
Registered: Mar 2010
Posts: 2
Rep:
|
hello. Have you sold the problem?
I have the same thing. I use Fedora 12, apache ver. 2.2.14.
But i generate pages with perl, so this problem is not in php+apache.
i search through the internet, there are many same problems, but i can`t find the solution. So on this forum this problem is more discussed, than in other places(where we have got 1-2 comments only), and i decide to write here too.
Code:
[Sat Mar 13 18:47:47 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 18:47:47 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 18:47:47 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 18:47:48 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 18:47:48 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 19:01:40 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 19:01:52 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 19:02:24 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:02:29 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:05:27 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:05:34 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:14:25 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:14:26 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:14:28 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:14:31 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:14:32 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:14:51 2010] [info] [client 62.176.11.182] (104)Connection reset by peer: core_output_filter: writing data to the network
[Sat Mar 13 19:25:00 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
[Sat Mar 13 19:25:01 2010] [info] [client 62.176.11.182] (32)Broken pipe: core_output_filter: writing data to the network
|
|
|
03-14-2010, 08:16 AM
|
#12
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Original Poster
Rep:
|
Hi Simak,
Unfortunately, there isn't anything new regarding my problem.
The log still records the same error and I haven't found a way to fix it.
|
|
|
12-27-2010, 04:53 PM
|
#13
|
Member
Registered: Jul 2008
Posts: 184
Rep:
|
same here
seams like nobody knows how to fix it
|
|
|
01-16-2011, 03:16 PM
|
#14
|
LQ Newbie
Registered: Mar 2010
Location: Sydney, Australia
Distribution: Debian & CentOS
Posts: 15
Original Poster
Rep:
|
Hi Stephan,
Any luck since your last post ? I would love to get rid of this error message that makes my error log file grow insane.
Last edited by johnsan; 01-16-2011 at 03:17 PM.
|
|
|
01-17-2011, 12:14 AM
|
#15
|
LQ Newbie
Registered: Mar 2010
Posts: 2
Rep:
|
In my case, the problem was in my home router.
If you want to read more - about how i try to solve the problem come here
|
|
|
All times are GMT -5. The time now is 11:18 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|