Symptoms
I am sending API request to Parallels Plesk Panel. It hangs and then fails due to time out. For example:---8<---
Host: localhost:8443
Accept: */*
HTTP_AUTH_LOGIN: admin
HTTP_AUTH_PASSWD: ********
HTTP_PRETTY_PRINT: TRUE
Content-Type: text/xml
Content-Length: 315
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet version="1.5.1.0">
<domain>
<set>
<filter><id>244</id></filter>
<values>
<gen_setup>
<status>0</status>
<name>newdomain.name</name>
<client_id>157</client_id>
</gen_setup>
</values>
</set>
</domain>
</packet>
* Empty reply from server
* Connection #0 to host localhost left intact
-------------------------
cURL error number:52
cURL error:Empty reply from server* Closing connection #0
--->8---
What causes the problem and how to resolve it?
Cause
MySQL queries are very slow. This may be caused by small amount of memory on the server or MySQL limits.Resolution
If you are sure that there is enough memory on the server it is recommended to reconfigure MySQL settings.Find example MySQL configuration file for very large systems (my-huge.cnf Linux/Unix or my-huge.ini for Windows) and copy the following parameters to main MySQL configuration file (my.cnf for Linu/Unix or my.ini for Windows):
key_buffer
table_cache
sort_buffer_size
read_buffer_size
read_rnd_buffer_size
query_cache_size
innodb_buffer_pool_size
innodb_additional_mem_pool_size
For example you may use the following command to find file my-huge.cnf on RedHat-like operating system:
~# rpm -ql mysql-server | grep my-huge.cnf
/usr/share/mysql/my-huge.cnf
~#After the parameters were added it is needed to restart MySQL service:
~# /etc/init.d/mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
~#Additional information
The problem may affect management of Panel server through Parallels Plesk Expand.Parallels Plesk Expand works with Panel servers via API requests. Actions may fail with error "Plesk server is unreachable now" when API requests hung. For example:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<packet action_id="5103188" version="2.3.2.17">
<set>
<result>
<status>error</status>
<errcode>2002</errcode>
<errtext>[Transport] Temporary error occurred while processing request. Plesk server is unreachable now: (52) Empty reply from server
Connection log
or
<reloadObjects>
<system>
<status>error</status>
<errcode>4000</errcode>
<errtext>[Transport] Temporary error occurred while processing request. Plesk server is unreachable now: (28) Operation timed out with 0 out of -1 bytes received
Connection log