Troubleshooting Plesk 12 API Connection Issues due to cURL Connection Reset

I'm currently utilizing cURL to send requests to the Plesk API.

Whenever I attempt a request that involves extensive processing by Plesk (like creating or deleting a subscription), I encounter a "connection was reset" error in my browser after approximately 10 seconds.

Interestingly, when I try something simpler (say removing a non-existent subscription), I receive an immediate and informative response.

Given that short cURL requests yield quick responses, I am inclined to believe this issue lies with my web server rather than the script itself.

Although my host has increased PHP's max_execution and max_input times to 120, as well as MySQL's max execution time, the connection still drops around the 10-second mark during cURL requests.

They appear to be running out of solutions and solving this problem is critical for me.

Do you have any recommendations on how I can troubleshoot and resolve this issue?

Answer №1

After making multiple API calls, my host observed that the Apache server was restarting each time.

This continuous restart of Apache caused a disruption in my connection, preventing the response from being delivered promptly.

To fix this issue, I decided to adjust the Apache restart interval from 0 seconds to 120 seconds. This change enabled me to circumvent the conflict and successfully retrieve the API response.

I stumbled upon a helpful tip regarding the interval setting on the Parallels forum. For more information, check out the discussion at the end of this thread.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I use Ajax code to send data to a PHP page and receive the results as a JSON-encoded multidimensional array containing information on each item?

Apologies for the unconventional question title. What I am trying to accomplish is managing two tables in my database: a hotel table (table1) and a room type table (table2). My goal is to allow customers to customize their travel packages by changing hote ...

finding a pair of double quotes with preg_match

I am trying to match a specific pattern in order to extract the word "target." INPUT TYPE="HIDDEN" NAME="TITLE" VALUE="target " Despite my efforts, I have been unsuccessful so far. preg_match('@(?:<INPUT TYPE="HIDDEN" NAME="TITLE" VALUE=")(. ...

Replacing parts of a string with str_replace function

I'm currently exploring the functionalities of str_replace and using curly brackets. When I input {the_title} in this line, I understand that it will be replaced with the value from the $some_runtime_generated_title array. But what exactly does the fi ...

Separate authentication module in yii2 framework

Currently, I am facing an issue with my Yii2 setup where I have 2 modules and I want to enable users to log in separately to each module using a different IdentityClass. However, once a user logs into one module (let's say Module A), they are automati ...

Is it possible to include both the value and text of a dropdown in form.serialize?

For my project, I need to serialize the form data. However, when it comes to dropdowns, only the values are captured and not the text of the selected option. <select name='attend'> <option value="1" selected="selected">Question&l ...

Removing HTML tags and then reapplying HTML tags Part 1

Attempting to convert the following string: <p> string <b> bold <em>italic string</em> also(bold) </b> </p> to this modified string: <p> string </p> <!----------- ...

Laravel7 CORS issue: CORS policy blocks request due to access control check failure - missing 'Access-Control-Allow-Origin' header

Scenario: Integrating VueJS/Laravel app inventory with Magento2 using SOAP API to update Quantity. Error encountered: The following error occurred when trying to access '' from origin '' - CORS policy blocked the request: Th ...

Steps to change the name of the key in a foreach iteration?

Currently, I am working on creating an XML file from a database query. The utility class that I am utilizing is giving me an error message stating Illegal character in tag name. tag: 0 I have identified that this issue stems from the array elements being ...

What could be causing the issue with my filter page not being able to retrieve any results from the

I am currently working on a filter page that is designed to display results in a table based on the selection made from a dropdown list. While I have written the necessary code and no errors are being detected, the results from the database are not showing ...

What is the best way to design a content page with linked boxes to various arrays in PHP?

How can I create a PHP menu template that navigates to different pages? I am new to PHP and still learning. I want to achieve something similar to this image: https://i.stack.imgur.com/ylfe8.jpg I have the code for the navigation bar, but I need help crea ...

Execute a repeated action to send multiple data values to a Python API endpoint

I have a Python API that retrieves and processes data based on the input parameter 'ID', returning a specific set of fields. Unfortunately, the parameter does not support passing multiple values at once. To address this limitation, I attempted to ...

How come I am unable to make PHP display a specific JSON element for me?

Wow, working with JSON data can really consume my day. Is it meant to be this challenging? Probably not. So, I have a URL that contains a JSON dataset. The structure looks like this: jsonval={%22Fname%22:+%22kjhjhkjhk%22,+%22Lname%22:+%22ghghfhg%22,+%22c ...

Utilizing jQuery.post to generate a dynamic dropdown menu

I recently designed a dropdown list that functions well on a standalone page. However, I encountered an issue when attempting to display it in a table on another page using jQuery.post(). The contents appear to overflow from the dropdown list. The jQuery ...

Is the m:m Eloquent Relationship in Laravel 5.5 with a 1:1 variant valid in this scenario?

My goal is to establish a 1:1 relationship using the orgperson() function, even though there is an existing m:m relationship called orgs(). This will allow me to eagerly load a default organization. The objects involved are as follows, each with its own t ...

Executing a form_open in CodeIgniter triggers a controller function passing an argument

Is it possible for something like this to happen? The standard syntax for form is: <?php echo form_open('controller_name/function_name');?> However, I have reached a point where I need to create a form controller function with an argumen ...

PHP - converting an array to JSON format and returning it

Let me start by mentioning that I have explored various Stack Overflow threads on this topic, yet I still find myself perplexed. Within my PHP code, I retrieve data from my database and attempt to store it in an array like so: $arrayResult = array(); ...

Show a success message, clear the post data, and redirect back to the current page

I have a single web page with a contact form. When the form is submitted, I want it to redirect to the same page and display a success message that fades out after a few seconds. Additionally, I want the post data of the form to be cleared. The form also i ...

Tips for validating an iFrame in a Symfony form input using a regex

When filling out a publishing form, users have the option to include one or multiple media items by simply copying and pasting <iframe> tags into the designated text fields. I am seeking a solution to ensure that only valid <iframe> tags are e ...

Issue: The plugin 0 mentioned in the file "/my dir/node_modules/babel-preset-php/src/index.js" contains an invalid property called "default"

While attempting to convert a PHP script to JavaScript using babel-preset-php, I encountered the following error: Error: Plugin 0 specified in "/media/deep/5738c180-2397-451b-b0b5-df09b7ad951e1/deepx/Documents/TestingAll/node_modules/babel-preset-php/ ...

Extracting Section Titles from INI using PHP

I've spent all night trying to perfect this code with no luck. I'm not even sure what to search for at this point. Here's the situation: I'm using PHP to parse .ini files into an HTML table. This is the code in my html file: <?php ...