Connection Reset on Media Upload

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Amon Tse
Regular
Posts: 8
Joined: Fri Dec 15, 2006 1:07 pm

Connection Reset on Media Upload

Post by Amon Tse »

Hi,

I have version 1.0.4 (a fresh installation) installed in RedHat Linix ES3 using apache server. I tried to upload Media to Media Library. However, it usually returns "Connection Reset", while the url is like "http://.../serendipity_admin.php?". I have tried both IE7 and FireFox and it seems the problem is not related to the Web browser. Do anyone know whether it is server problem and how to correct this?

Thank you first in advance.

Amon
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Connection Reset on Media Upload

Post by garvinhicking »

Hi!

Please ask your provider if he is running mod_security. It seems that some security restriction is forbidding upload to your server.

Also ask your provider if PHP file uploads are enabled and what the upload file limit is. You might want to try to upload a small image with less than 100kb?

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Amon Tse
Regular
Posts: 8
Joined: Fri Dec 15, 2006 1:07 pm

Post by Amon Tse »

Hi Garvin,

Thanks for your reply. I am managing the server myself, so I can change the parameters.

I have tried to upload a small image (200K) and it works. So, the upload is enabled. However, if I pick a bigger one (600K), it fails as the Connection Reset.

I have already changed php.ini

file_uploads = On
upload_max_filesize = 2000M
memory_limit = 10M

Do you have any idea what else should be configured?

Thanks in advance.

Amon
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It might be that your memory_limit is hit, or your "post_max_size" setting is too low?

Try to turn on the error_log directive of your PHP, and then you might see coredumps or fatal error messages in your Apache server log or syslog?

It's definitely that your PHP/Webserver dies because of too large data or memory consumption...

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Amon Tse
Regular
Posts: 8
Joined: Fri Dec 15, 2006 1:07 pm

Post by Amon Tse »

Thanks Garvin for your direction. I get the error from apache error log as below:

[Thu Jan 11 00:45:21 2007] [error] [client xxx.xxx.xxx.xxx] Requested content-len
gth of 3340261 is larger than the configured limit of 524288, referer: http://host/serendipity_admin.php?seren ... e]=media&s
erendipity[adminAction]=addSelect

Would you please give me an idea what should I do to get rid of it?

Many Many thanks.
Amon
Amon Tse
Regular
Posts: 8
Joined: Fri Dec 15, 2006 1:07 pm

Post by Amon Tse »

Hi,

I found the issue. It is Redhat ES specific issue is the default configurtion. The problem can be solved by comment out the line "LimitRequestBody 524288" in /etc/httpd/conf.d/php.conf

Anyway, thanks Garvin for your time to help to diagnosis the problem.

Amon
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Thanks for telling us! I didn't know there was such an option, so I'll bear that in mind for the future. :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply