How can we improve WHMCS?

Share, discuss and vote for what you would like to see added to WHMCS

Customise Domain Sync batch size above 50

  • Igor Kaczor shared this idea 4 years ago
  • Domains
  • 6 Comments


We have 6000+ active domains right now. With the domain sync cron set to run every hour (the most frequent available setting) and syncing 50 domains only it will take it roughly 5 days to sync them all.

Allowing us to run it more frequent and/or sync more than 50 domains at a time would be super helpful.
WHMCS Team Clarification:
To benefit the most number of users, we're adding this clarification that the request's scope is being broadened to allow customisation of the domain sync batch size.
Allowing the batch size to be customised, could simultaneously meet the needs of users who need to sync fewer than 50 domains and also users who need to sync more.

12 Comments

Login to post a comment.

To be honest, sync at the moment is a bit of a blunt instrument as it doesn't allow differentiation between different TLDs which can have vastly different requirements. Any Hosts/Registrars that handle more than a couple of ccTLDS will know what I mean!

The above suggestions re customizing batch size and manual sync from the panel would be great. I'd add to that the ability to allow the "Domain Sync Notify Only" option be separately selectable for transfer and for regular sync (we'd like to have post transfer sync update domain dates, but not regular sync which is currently too dangerous in our situation because of the variety of domains we provide).

But to my mind, the most useful thing for sync would be to create a couple of Hooks to allow us customize sync behavior.

PreSync hook could run before the sync and receives a list of domains in the batch, along with the default sync settings. This would allow us to remove domains from the batch if they are of a type where automatic sync could cause problems.

PostSync hook could run after sync (but before domain database updates) and provide a list of domains with updated information, so we could override expiry or due dates for domains in certain TLDs after the up-to-date information has been returned from the registry/registrar.

The ability to override due date on a domain by domain basis is important for us because many TLDs auto-renew with the registry or registrar (something that WHMCS does not handle well) or they can suspend or even delete much earlier than gTLDS (.pl would be a great example) ... such domains need a much earlier due date and invoice generation to allow us to cancel them in time, if the client has disabled the domain, or simply has not paid.

Other users probably have other requirements, so having hooks to allow us flexibility is probably useful to many.
I'm wondering how often you really need to sync domains and what the purpose is.

If it's to avoid renewing a domain that is transferred away for example; WHMCS could sync domains before creating an invoice/renewing to make sure this isn't an issue.
That could work too, it would be ideal if that was added in addition to the proposed sync changes.
@WHMCS John

Question related to this topic have also been brought up several times to our Support (HEXONET). Resellers with a larger domain portfolio really need a lot of time until data is completely synced. We at HEXONET have a Quota System in Place. But, the API Commands used in the Domain Synchronization do even not affect this Quota System. Therefore we would highly enjoy having more customizing possibilities regarding the Sync Automation Settings.
Some of our Resellers started automating using a custom script that is just invoking the sync from command line in a loop e.g. 5 x 50 = 250 domains per run.

If the most of the registrars are not affected by such a limitation, it would of course be a bad idea to apply restrictions in general - a disadvantage for the majority then. But, I have no statistics insights regarding that matter - therefore, adding more flexibility would be just great.

Thanks
Kai Schwarz
Thanks for sharing that experience and insight Kai, much appreciated.
We are in the same situation.

I think a way around this would be a simple box in automation settings to set a maximum limit - per active registrar module.

That would allow people to use a "default" recommended limit, or increase it further if required/able to.
The current batch size of 50 was arrived at so as to prevent API requests being blocked due to rate-limiting by the registrar. Case in point we worked with Namecheap earlier this year to increase the default rate limits, as they were being triggered by a 50 domain batch size (alongside all other requests).

* https://www.namecheap.com/support/knowledgebase/article.aspx/9739/63/api-faq/#z
* https://manage.resellerclub.com/kb/node/744

We are interested in collecting feedback to hear if your registrar applies such rate limits and what those limits are (if known).
You can add the following script in includes/hooks (replace .txt with .php)

This script basically overrides the value "Domain Status Sync Frequency" set in WHMCS and forces a Domain status sync at every cron job, which is by default every 5 minutes. This way you can sync 600 domains per hour.
Hey there,

No script was attached? This would be handy if you're able to publish this. Thanks
Wouter bakker, what script ? I dont see any links or anything, i reallly need this script :/
*Adding a manual sync would be great
You can already execute a sync manually over shell. Still, and there I fully agree, it would be easier by button click in admin area e.g. for a single domain.