• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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