Customer cannot publish their site in Web Presence Builder (WPB), which works on the Linux Shared Hosting NG web cluster.
The error message
Unable to connect to Web Presence Builder server. Please contact the server administrator. is shown to the customer in the browser when they try to publish their website.
According to WPB logs, the website has successfully been published:
/WPB/PATH/TO/LOG/sitebuilder.log [INFO] [System] /JsonApi/ The site 'ed7865a6e32d88c18852b4cca0297b8e' has been successfully published. Site id: ed7865a6e32d88c18852b4cca0297b8e Publication settings target: ftp://email@example.com/webspace/httpdocs/customer.com Publication settings url: http://customer.com 192.168.1.102 http://wpb.provider.com/Editor Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 2013-01-29T17:53:58+01:00 [DEBUG] [System] /JsonApi/ Publication process finished. Site id: ed7865a6e32d88c18852b4cca0297b8e
However, the customer's browser shows an error message as in the image below:
Also, in the Apache logs in the customer's webspace, the following error message is stored when trying to publish the website in Web Presence Builder:
---8<--- [error] [client 126.96.36.199] Premature end of script headers: php, referer: http://wpb.provider.com/Editor --->8---
ssl_error_log contains the following error:
Script timed out before returning headers: php, referer: https://sitebuilder.services.openconnect.com.au/Editor
Most frequently, this issue is caused by a large number of files in the website. The task to publish the website fails with a timeout.
See KB article #125464 if the website have less than 50 pages, but the issue occurs.
Verify and adjust PHP settings on the Web Server according to the Integration Guide for Plesk Automation for Web Presence 10.3, Plesk Automation for Web Presence 11.0, Plesk Presence Builder 11.5 for PA 5.4 or Plesk Presence Builder 12.0 for PA:
6 Adjust the following PHP settings to the recommended values: • max_execution_time = 600 • memory_limit = 192M • post_max_size = 2147483647 • upload_max_size = 2147483647
If Presence Builder centralized instance is deployed in NG, above changes should be made on all web servers in cluster.
Try to increase the ScriptTTL value to 1200 (or greater) in the
/etc/httpd/conf.d/modsucgid.conf file on the NG Hosting web servers:
<IfModule mod_sucgid.c> ScriptSock logs ScriptDaemon /usr/sbin/daemon_sucgid ScriptLog logs/sucgid_script.log ScriptLogLength 30000 ScriptLogBuffer 1024 ScriptDaemonsCount 32 # MaxChildCount 500 ScriptTTL 1200 EnableLVE Off </IfModule>
The default timeout is 120 seconds, and Apache closes the connection if the script remains silent for that duration.
Verify and adjust the timeout set for apache on Web Presence Builder server:
Increase the timeout value to "3600" in file
/usr/local/pem/etc/apache/httpd.conf_pem.overrideon server hosting the web presence main site
# cat /usr/local/pem/etc/apache/httpd.conf_pem.override TIMEOUT 1200
Restart apache service on server that hosts the web presence main site:
# service pemhttpd restart
# service httpd restart