Feature Requests
Share ideas, discuss and vote on requests from other users in community
This object is in archive! 

Virtualmin Provisioning Module - cURL Request Timeout Config Option

WebMate Development shared this idea 2 years ago
Under Consideration

It be really handy to be able to configure the cURL timeout value for this module.

The timeout currently defaults to 60 seconds which is fine until the Virtualmin server reaches a large number of virtual servers configured. When this happens the create request can take over 60 seconds to complete successfully and causes the timeout to be reached and the module returns an error, when in fact the action has completed successfully on the server.

This timeout feature would be ideally be implemented as a module config option.

Comments (1)


This is part of a much bigger problem if you're using Virtualmin, or more complex, should I say.

It's a huge problem because the customer doesn't get their welcome email and manual intervention is required after every single shared hosting order on a Virtualmin box.

It is true that WHMCS is unreliable when talking to Virtualmin. The problem however isn't always on the WHMCS's side although there is work that WHMCS can do to improve the situation.

1. Virtualmin commissioning generally can be slow, the Perl CGI commands it executes just takes a lot of time to complete. The default on most servers of one minute is not long enough even on a simple 4GB RAM, 2 vCPU server which 5 little used sites. The command sent by WHMCS `list-domains` and `multiline` takes long, very long.

2. Here is an example I just kicked off:

php -q /home/whmcsdev/public_html/crons/cron.php all -F -vvv

Below are some processes that are kicking in on the remote serve, notice the 15.4 which is 15.4% CPU utilisation.

9078 root 20 0 204944 101360 2884 S 15.4 2.4 0:00.64 /usr/libexec/webmin/virtual-server/list-domains.pl

9069 root 20 0 159592 73712 3324 S 1.1 1.8 0:00.10 /usr/libexec/webmin/virtual-server/remote.cgi

That job never completes as I get this in the log:

Curl Error: 28 - Operation timed out after 60000 milliseconds with 54365 out of -1 bytes received

It's a very small server, 4GB RAM, 2 vCPU, but just 5 very small not often used sites.

CURL's timeout via PHP can be set and server timeout can be set. But think about it for a minute, will anyone sit in front of an interface and wait 60 seconds or 2 minutes, or more to wait for something to complete?


1. WHMCS should guide one to where to set the timeout (short term fix)

2. WHMCS should queue the request using what's called message queuing. Wait for it to complete, and then send welcome email.

3. Virtualmin should speed up their CGI processes. Maybe rewrite some of them. Not sure.

FYI this problem has been described to a limited degree on the Virtualmin forum: