phpapipleskplesk-onyx

Plesk Api multiple query 502 error


I am working on plesk php api. I am adding subscription. There is no problem in this actions. When I was calling multiple query at the same time. Second query is make unsuccessful. Server sending 502 gateway error. I think; plesk api dont process multiple task. I want to make hosting creator. My customers will create own hosting on my customer panel. So I need multiple process at the same time. How i solve this problem ?


Solution

  • Let me assume that you are sending an API request from PHP application located on the same server.

    During the subscription creation, Plesk creates new configuration files for web services and reloading these services to apply the new configuration. As a result, PHP application fails whilst, for example, Apache is being restarted at the moment.

    As half-measures, you may consider setting Apache restart interval in Tools & Settings > Apache Web Server or enabling graceful restart for Apache.

    The best and the right way, of course, is to use a separate hosting to send API queries.