An eight-line change to how SellYourSaas counts deployments in progress.
Resposta curta
SellYourSaas refused to create new instances with "Too many pending requests" whenever deployments marked processing from the last 24 hours reached the parallel limit, even if those deployments were long dead. The fix counts only deployments started within a configurable delay (one hour by default) and raises the default parallel limit from 2 to 4. It was merged as PR #488 and closed issue #418.
The problem
SellYourSaas automates deploying and selling a web application as a SaaS service, on top of Dolibarr.
Issue #418 described the symptom. After creating one instance, the reporter tried to create a second and got "Too many pending requests. Please try again later." The message was still there more than 24 hours later, with no stuck cron jobs and nothing relevant in the logs.
Root cause
Before accepting a new instance, myaccount/register_instance.php counts rows on the deployment host whose status is processing. The query ignored deployments started more than 24 hours ago, with a code comment explaining that such deployments "are supposed to be finished even if not correctly flagged as 'done'." Within that window, though, a deployment left flagged processing still counted against the limit.
The fix
$MAXDEPLOYMENTPARALLEL = getDolGlobalInt('SELLYOURSAAS_MAXDEPLOYMENTPARALLEL', 4);
...
$MAXDELAYFORDEPLOYMENTINPROGRESS = getDolGlobalInt('SELLYOURSAAS_MAXDELAYFORDEPLOYMENTINPROGRESS', 3600);
if ($MAXDELAYFORDEPLOYMENTINPROGRESS <= 0) {
$MAXDELAYFORDEPLOYMENTINPROGRESS = 3600;
}
...
$select .= " AND deployment_date_start >= '".$db->idate(dol_now() - $MAXDELAYFORDEPLOYMENTINPROGRESS)."'";
The PR description explains the defaults. One hour is well above the 300-second deploy timeout. The parallel limit of 4 matches the value the admin security setup page already documents and pre-fills.
By the numbers
- Repository: DoliCloud/SellYourSaas, 296 stars (Nov 3, 2026), PHP, GPL-3.0
- Files changed: 1
- Lines: +6 / -2
- Commits: 1
- Opened: Aug 21, 2026. Merged: Aug 29, 2026. Time to merge: 7 days, 22 hours
- Review: merged by a maintainer without review comments
How the review went
There was no discussion on the pull request. A maintainer merged it about a week after it was opened, closing an issue that had been open since April 2025.
Perguntas frequentes
Can operators change the new window?
Yes. SELLYOURSAAS_MAXDELAYFORDEPLOYMENTINPROGRESS is a hidden option in seconds. A value of zero or less falls back to 3600.
Where can I read more?
See the pull request and the original issue.
O objetivo
A lock that never expires becomes an outage. Bounding the window to something close to how long a deployment can actually take turns a day-long block into a short wait.