Home / Scripts & Code / PHP Scripts / Multimedia / Image
BGWipe - AI Background Removal SaaS PlatformBGWipe - AI Background Removal SaaS Platform
AI background removal SaaS with API key selling, 3 payment gateways, wallet, affiliate system & admin panel. No API key neededHome / Scripts & Code / PHP Scripts / Multimedia / Image
BGWipe - AI Background Removal SaaS Platform
AI background removal SaaS with API key selling, 3 payment gateways, wallet, affiliate system &am...4 Support questions or comments
Please login or create an account to post a question or comment.
-
23 hours agochandandas AuthorHi Prabhat,
Thanks for the feedback! We've implemented exactly what you requested. Here's what's been done:
✅ Queue-Based System Implemented
The background removal process no longer runs inline during the HTTP request. Instead:
AJAX Upload — When you upload an image, the form now submits via AJAX (no full page reload). The server saves the file and creates a job in a processing_jobs database queue, then responds instantly with a job token.
Background Worker — A separate PHP process (queue_worker.php) is automatically launched in the background via nohup. This worker picks up the job from the database and runs the Python AI processing — completely independent of the web request. No Apache/PHP timeout limits apply.
Status Polling — The browser polls a lightweight GET /job-status?token=xxx endpoint every 2 seconds to check if the job is done. Once complete, it auto-redirects to the result page. If the job fails, the error is shown inline.
Fallback Processing Page — If JavaScript is disabled, users are redirected to a dedicated /job-status waiting page that polls automatically.
Why this fixes the timeout issue on 1GB shared hosting:
The web request completes in under 1 second (just file upload + DB insert)
The heavy Python processing runs in a detached CLI process with its own 5-minute time limit
No page reload during processing — everything is AJAX
Stuck jobs auto-recover after 5 minutes
Works on cPanel shared hosting — no daemon/supervisor/cron required (though optionally a cron * * * * * php scripts/queue_worker.php can be added for extra reliability)
No server upgrade needed. This should work smoothly on your current 1GB RAM shared hosting.
Let me know if you face any issues!
-
1 day agoyou need to implement queue based system otherwise it timeout and the processing should be ajax based or somekind of endpoint it should call now it directly reloads the tab which gets timeout -
1 day agochandandas AuthorHi,
Currently the issue is happening because the server is on a shared cPanel hosting with only 1GB RAM. In this environment, long-running processes often hit execution time or memory limits, which causes the tab to reload and eventually timeout.
On a 2GB RAM server, this issue does not occur because there are enough resources to handle the process smoothly.
To properly solve this on the current server, we would need to:
Implement a queue-based system (so the heavy task runs in background).
Convert the current process to an AJAX-based call or dedicated endpoint, instead of full page reload.
Process the task asynchronously and return status updates.
However, on shared cPanel hosting, background workers and queue daemons are limited or not reliable. For a stable solution, either:
Upgrade to a 2GB VPS/server, or
Move to hosting that supports background workers (like Laravel queues with cron/supervisor).
Please let me know how you'd like to proceed. -
1 day agonice good script i am from guwahati
Information
| Category | Scripts & Code / PHP Scripts / Multimedia / Image |
| First release | 2 March 2026 |
| Last update | 2 March 2026 |
| Software version | PHP 8.0, PHP 8.1, PHP 8.2, PHP 8.3, PHP 8.4 |
| Files included | .py, .php, .css, .html, .sql, Javascript .js |
| Tags | admin panel, rest api, Background Eraser, background remover, Affiliate Program, saas platform, ai saas, wallet system, php saas script, remove background api, sell api, api as a service, image background removal, stripe paypal razorpay, ai image processing |
