Question

I have a survey program (limesurvey) running on my server(Apache), and SMTP email set on different servers. I want to send an email invitation to a group of people (about 10.000). Everytime I send a group of emails (20-500 emails) from the survey program (using the smtp email), during this "sending time", all pages requests to the survey program are being blocked. After it finishes sending the emails, people can see the requested page again.

I'm wondering if this is a problem from the program I use or it's a setting problem in my SMTP Emails Server or maybe settings on my Apache server?. Has anyone ran into that same problem and is there a solution for it?

Was it helpful?

Solution

Almost certainly you're using a standard file-based session. While your mail sending script is running, it keeps the session file locked, meaning that any other parallel requests to any other session-enabled scripts using that particular session ID will be locked out.

You need release the session lock by adding in a session_write_close() call in the appropriate places (e.g. before any long-running code sections/scripts). That'll release the lock and allow other parallel requests to proceed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top