Running import-csv.php and 500 Internal Server Error
Is it possible to put a limit number of email imported each time to avoid this error ? if not how can i add this ?
regards marc
This discussion has been closed.
Is it possible to put a limit number of email imported each time to avoid this error ? if not how can i add this ?
regards marc
Comments
Hi @marciv,
If you're getting 500 internal server error while importing a CSV, your server timed out. The solution is to setup a cron job for CSV imports. The cron setup instructions can be found at the "Add subscribers" page (where you import your CSV).
Save your CSV into several smaller chunks.
Again, setting up a cron job to import your CSVs especially when they are huge would be the best solution as it features automatic resume if the import times out. The importing will also be done completely in the background on the server.
Thanks.
Best regards,
Ben
If you're getting 500 internal server error while importing a CSV, your server timed out. The solution is to setup a cron job
=> it's what I did here is the result
Is it possible to put a limit number of email imported each time to avoid this error ? if not how can i add this ?
=> sorry i am serious in email marketing my list is >500k@ i can't handle small list of 20k@
Again, setting up a cron job to import your CSVs especially when they are huge would be the best solution as it features automatic resume if the import times out.
=> This is my cron target which is time out !
So at the beginning despite time ou error everythin was ok Email are imported (cron is updated every minute) but about 20k@ it stop...
I need a decent solution ;-)
regards marc
Hi @marciv,
I see you're hosted on OVH, are you on the shared or VPS server?
Also, did you see the 500 error upon uploading your 500k CSV? If so what is your CSV's file size and your PHP's
upload_max_filesize
?Thanks.
Best regards,
Ben
I am on shared hosting with powerfull private mysql i can't change these parameter.
SO my first question was can i manage you script to be short enought to run each time <30s. Where can i insert a break in php ?
@marciv,
Your list is half a million in size and you're running Sendy on a shared server? If you're serious about email marketing, I suggest running Sendy on a VPS server especially with an enormous subscriber base of 500,000 emails.
What you're experiencing is not PHP timeout, it's either memory exhaustion or your host is limiting your upload file size with
upload_max_filesize
. Shared servers only give you a limited amount of server resources, limited CPU and limited memory. In other words, you're using an severely under-powered server to run Sendy on a gigantic list of 500,000 subscribers.You need to be able to change
upload_max_filesize
to match the size of the CSV you're uploading, otherwise your CSV cannot be uploaded. You have 2 options:Lastly, Sendy is only restricted by the kind of server you run on. You can run it on a shared server, it's fine, as long as your subscriber base is not too big. 500,000 is out of question for a shared server.
Thanks.
Best regards,
Ben
Ben, i understand very well. My hosting service is limited.
But the problem is not csv uploading wich works fine, but during import csv to mysql wich
But it ll be easy to split the list at the begining (when you upload csv first time) and to handle small list each time you run cron job to avoid time out error. That't my purpose
Now i have to give up with sendy because i can't manage a VPS or a dedicated server myself.
Regards, marc