• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Batch MySql script stopped. "(104)Connection reset by peer"

JosBluet

New Pleskian
Hi,
I've this terrible problem: on my site I start a script that executes a batch process that imports into the Mysql database a lot of products (texts and images). I'm monitoring the query process from Phpmyadmin>Status and I notice that after some minutes the number of queries decreases from ~900 to ~30, that means that the script is stopped! Then I check the error_log and infact there's this error:
[Thu Oct 02 17:09:34 2014] [warn] [client xxx.xxx.xxx.xxx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Thu Oct 02 17:09:34 2014] [error] [client xxx.xxx.xxx.xxx] Premature end of script headers: insert_products.php


How can solve it?

Some informations:
VPS server: 1 CPU; 40gb; RAM 1GB
OS: CentOS 6.5 (Final)
Plesk version: 12.0.18

What I tried via SSH console:

# /usr/local/psa/admin/bin/php_handlers_control --list

id: display name: version: type: cgi-bin: cli-bin: php.ini:

module 5.3.3 5.3.3 module /usr/bin/php-cgi /etc/php.ini

fastcgi 5.3.3 5.3.3 fastcgi /usr/bin/php-cgi /etc/php.ini

cgi 5.3.3 5.3.3 cgi /usr/bin/php-cgi /etc/php.ini



# /usr/bin/php-cgi -v

PHP 5.3.3 (cgi-fcgi) (built: Aug 6 2014 05:52:41)

Copyright (c) 1997-2010 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.




# free -m

total used free shared buffers cached

Mem: 988 818 170 0 72 233

-/+ buffers/cache: 512 475

Swap: 1023 54 969




# ls -la /etc/passwd

-rw-r--r--. 1 root root 1910 23 set 12:20 /etc/passwd




In the php.ini

/var/www/vhosts/system/mydomain.com/etc

these are the only properties I edited:

max_input_time = 360000
max_execution_time = 360000
memory_limit = 1G
upload_max_filesize = 1G
 
Last edited:
Make sure that you have the same permissions for cgi_wrapper:

# stat /var/www/cgi-bin/cgi_wrapper
File: «/var/www/cgi-bin/cgi_wrapper»
Size: 4096 Blocks: 8 IO Block: 4096 каталог
Device: 19h/25d Inode: 45331664 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
 
Hi Igor, I tried it:
# stat /var/www/cgi-bin/cgi_wrapper
File: `/var/www/cgi-bin/cgi_wrapper'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd00h/64768dInode: 262156 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-09-14 22:02:02.922945601 +0200
Modify: 2014-09-14 22:02:02.938945601 +0200
Change: 2014-09-14 22:02:02.938945601 +0200

It seems ok...
 
Back
Top