logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: (9)Bad file descriptor: mod_fcgid: can't truncate existing t
Author
javii



Joined: 07 Nov 2011
Posts: 2

PostPosted: Mon 07 Nov '11 19:42    Post subject: (9)Bad file descriptor: mod_fcgid: can't truncate existing t Reply with quote

Hi, I'm having some strange problems with Apache running PHP with mod_fcgid.

Most things works fine but when I try to use Wordpress Uploader, i get 500 errors:

[07/Nov/2011:17:02:27 +0100] "POST /wordpress/wp-admin/async-upload.php HTTP/1.1" 200 425 "-" "Shockwave Flash"

(9)Bad file descriptor: mod_fcgid: can't truncate existing temporary file

This is my fcgid.conf:
LoadModule fcgid_module modules/mod_fcgid.so

<IfModule mod_fcgid.c>

<IfModule !mod_fastcgi.c>
AddHandler fcgid-script fcg fcgi fpl
</IfModule>

FcgidIPCDir /var/run/mod_fcgid/sock
FcgidProcessTableFile /var/run/mod_fcgid/fcgid_shm

FcgidIdleTimeout 300
FcgidProcessLifeTime 1800
FcgidMaxProcesses 100
FcgidMaxProcessesPerClass 8
FcgidMinProcessesPerClass 0
FcgidConnectTimeout 120
FcgidIOTimeout 120
FcgidInitialEnv RAILS_ENV production
FcgidIdleScanInterval 10
FcgidMaxRequestsPerProcess 10000
FcgidMaxRequestLen 20971520
</IfModule>


Any help would be appreciated
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Wed 09 Nov '11 22:36    Post subject: Reply with quote

Is there a file size from which on it doesn't work any more? Do smaller files work? Where is the php temp dir in your php.ini set to? How is the permission of that folder?

it would be nice if you could provide the error log from apache in that time when you upload a file and also if you have enabled the php error log.


Are you running some kinda linux / unix? from the paths it seems so Wink

apache verion?
php version?
mod_fcgid version?
Back to top
javii



Joined: 07 Nov 2011
Posts: 2

PostPosted: Thu 10 Nov '11 11:25    Post subject: Reply with quote

No, it is ramdom, when you upload 10 files, it usually uploads 2 or 3, it doesn't matter the size of each one. upload tmp dir in php is set to /tmp and that directory has 777 permissions.

This is what I see in logs:
[10/Nov/2011:10:19:04 +0100] "GET /wp-includes/js/swfupload/swfupload.swf?preventswfcaching=1320916744870 HTTP/1.1" 200 13087 "http://xxxxxxx/wp-admin/media-new.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2"
[10/Nov/2011:10:19:09 +0100] "POST /wp-admin/async-upload.php HTTP/1.1" 200 423 "-" "Shockwave Flash"
[10/Nov/2011:10:19:11 +0100] "POST /wp-admin/async-upload.php HTTP/1.1" 200 4451 "http://xxxxxxx/wp-admin/media-new.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2"
[10/Nov/2011:10:19:11 +0100] "GET /wp-content/uploads/2011/11/Lighthouse1-150x150.jpg HTTP/1.1" 200 7299 "http://xxxxxx/wp-admin/media-new.php" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2"
[10/Nov/2011:10:19:11 +0100] "POST /wp-admin/async-upload.php HTTP/1.1" 200 718 "-" "Shockwave Flash"
[10/Nov/2011:10:19:12 +0100] "POST /wp-admin/async-upload.php HTTP/1.1" 200 713 "-" "Shockwave Flash"
[10/Nov/2011:10:19:14 +0100] "POST /wp-admin/async-upload.php HTTP/1.1" 200 717 "-" "Shockwave Flash"
[10/Nov/2011:10:19:15 +0100] "POST /wp-admin/async-upload.php HTTP/1.1" 200 716 "-" "Shockwave Flash"
[10/Nov/2011:10:19:17 +0100] "POST /wp-admin/async-upload.php HTTP/1.1" 200 714 "-" "Shockwave Flash"

PHP logging is enabled but nothing is logged by PHP.

OS: Centos 5.5
Versions: Apache/2.2.20 (Unix) DAV/2 mod_ssl/2.2.20 OpenSSL/0.9.8e-fips-rhel5 mod_fcgid/2.3.6 PHP/5.2.17 mod_python/3.2.8 Python/2.4.3 mod_perl/2.0.4 Perl/v5.8.8

Thank you!!!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Fri 11 Nov '11 3:23    Post subject: Reply with quote

I don't see there any 500 error in that log part ou posted. O_o

Cause it works with a few files, but now with many I guess there is a time out error. But I'm not sure since I see there is a async-upload.php. So I think it uploads each file in a own upload process.

To what is your exection time set in php.ini? Did you tried with an increased time?
Back to top


Reply to topic   Topic: (9)Bad file descriptor: mod_fcgid: can't truncate existing t View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules