Linux - ServerThis 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.
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.
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?
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?
[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.
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:
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.