0

I'm using cURL to make Plesk API requests.

When I make a request that requires lengthy action by Plesk (such as creating or removing a subscription), I get a "connection was reset" browser error after about 10 seconds.

However, if I try something which I know is simple (such as removing a subscription that doesn't exist), it returns immediately and with a useful response.

Since short cURL requests return a response immediately, I feel pretty certain this is an issue with my web server and not my script.

My host has upped PHP's max_execution and max_input times to 120, as well MySQL max execution time. However, the connection still closes about 10 seconds into the cURL request.

They seem out of ideas and I really need this to work.

Any suggestions on how to troubleshoot this?

HWD
  • 1,547
  • 7
  • 36
  • 72

1 Answers1

1

My host noticed that the Apache server was restarting after each of my API calls.

The Apache restart was interrupting my connection before the response could be returned.

By updating the Apache restart interval from 0 seconds to 120 seconds, I was able to avoid this conflict and receive the API response.

I found a tip about the interval setting in the Parallels forum. See the end of this thread.

HWD
  • 1,547
  • 7
  • 36
  • 72