1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

All connections are closed when subdomain is created

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by BorisÃ…, Feb 28, 2012.

  1. BorisÃ…

    BorisÃ… Guest

    Parallels Plesk Panel, 10.3, Ubuntu 10.04.4 LTS

    All connection to server are closed when subdomain is created.

    I made simple example:

    # file: sleep.php
    shell_exec('sleep 60');
    echo '60 dome';
    I request this file via browser as http://www.domain.com/sleep.php and during 60 seconds delay I create subdomain for this domain, eg. sub1.domain.com. Delay is broken and ERR_EMPTY_RESPONSE is returned, when new subdomain is created.

    I expact that no connection is broken.
  2. BorisÃ…

    BorisÃ… Guest

    I investigate this behaviour deeply and find out, that this happens when another subscription is added also or subdomain for another domain is added.

    I run PHP for my domain as Apache module, FastCGI and CGI - the result is always same, all HTTP connection to my server are closed. Is there any workaround or fix or can I try some configuration to avoid closing connections of my users?
  3. Hostasaurus.Com

    Hostasaurus.Com Regular Pleskian

    Oct 8, 2009
    Likes Received:
    The cause is that when a new subscription, subdomain or alias domain is added, apache needs to be restarted to read the new config file that Plesk has created. This problem will only get worse as more domains are added to the server; once you get to 100+, it can take a minute or longer for apache to restart, leaving all the sites down while it does. It's really ugly and the cause is most likely apache having to read the 4+ config files for every site that get added because the issue never occurred on Plesk 8.
  4. burnleyvic

    burnleyvic Regular Pleskian

    Nov 9, 2011
    Likes Received:
    IIRC Igor@Parallels posted recently a solution for the Apache restart problem. Try this query on psa database and retest:
    INSERT INTO misc VALUES ('restart_apache_gracefully', 'true');
  5. jebbie23

    jebbie23 Guest

    Funny about that issue is.. in Plesk 9, the creation of a subdomain through the RCP API worked fine - i could print out with simple echo-statements the response-xml

    Now, after updating to Plesk 10, the creation of a subdomain through the RCP API will immediately close all connections, i'm not even able to handle the response-xml in the php code, serverside (i testet this with logging into error_log, and this does not work)

    I don't understand why.. when i'm adding a subdomain on the plesk-panel online, it is just working fine without loosing all connections - because if it would be the same behavior in the plesk-panel like in the API, i would get an error-page after adding the subdomain in the plesk panle, saying ERR_EMPTY_RESPONSE (in chrome).. what the hell does Plesk Panel to work around this...
  6. DarioG

    DarioG Guest

    This is exaclty my current problem with one system that allow user choose a subdomain when they registered in the site, i fixed using query of #4