Hi All! I’ve submitted many entries in quick succession on my site (copy and paste in content, new entry, repeat). So perhaps an entry every 5-10 seconds for about 20 new entries.
When I do, I often get a timeout for a few seconds where the control panel and front-end site say “nothing sent” error. My hosting provider says it’s not the server. Does anyone know what causes this? How I can fix it?
Hi Joe. Can you let us know more information about your environment? What version of ExpressionEngine, PHP version, any add-ons installed, screenshot of the error, etc? I haven’t personally seen this happen, so some more information might helpful to see if we can track down what’s happening.
Thanks.
How are you sure it’s not the server? Is this a shared hosting plan because it’s very likely you just received a generic reply, and they did not actually bother to look because it’s usually the end user responsible for managing the configuration. Budget shared hosting is very constrained in limits. It works fine for most websites but nothing that requires intensive tasks. The cheaper your hosting plan, the most likely its more limited, otherwise it just not profitable for them to offer the service.
PHP default timeout is 30 seconds (which you should not change since it’s ok for web server requests). While some people do change it to 60 it’s not advisable to set it longer as it can lead to abusing your website with long process that will spike the load. Also, what are the settings on PHP? The memory limit?
From what you posted, this is very, but extremely likely your server and not Expression Engine. Most shared hostings have a maximum process limit per second, if you are creating 20 PHP requests per second, its likely you are hitting the max and they are killing the remaining process. Or your database is has some limit or your process dies because of memory, it can be multiple reasons. I would first check your server logs, check the HTTP requests, what code is it returning, is it 200 ok? Or 500 server error? Also check your PHP error log.
If you check the logs you will most likely see if there is an EE error but if entries work fine normally but don’t when you do then in quick succession this 100% means something in your server is hitting a limit, it can be a limit on CPU, PHP process, memory, timeouts, database. Your logs are your best friend.
Its almost impossible to tell the real issue unless you check the logs.
So after discussing with the hosting company, they have said that it is causing spikes in bandwidth.
All I am doing now is adding members. I create 3 members, the 4th one will crash the site for 30 seconds or so - everything down. After waiting that time, I add 3 new members, the 4th one crashed the site again.
Anyone else finding that when adding new members?
Bandwidth? No, you either got that wrong or the tech that told you has no clue. You cannot max out the server bandwidth with a few HTTP requests, unless your website is hosted on a server with a dial-up 56 K connection 😊
You are either hitting a CPU limit, memory or maximum process allowed per second. Is your hosting service using cPanel? If yes, are they using Cloud Linux? You can check this if you have some CPU, memory or process metrics in your control panel. What you explained about 3 users being created, and the 4 fails is absolutely a limit on your hosting account or server. Either put by the provider or accidentally because of underperforming server.
No, I don’t have that issue but I run EE on its own dedicated server. While trying to create many channels or users at the same time it will cause CPU spikes on any server, the volume any PHP software can handle depends on your server performance. But even then you should not really do this in the first place.
It will cause issues on any server at some point depending on the amount of data you want to process per second, everything has a limit at some point. You should not be sending 3 or 4 users or channel entries at the same time. You should send 1 request, wait it to finish, then sent the next one, and so like in a queue. This gives your server time to process the first request before starting the second one. Data entry is far more intensive than just reading data from a website that usually has a cache.
Any PHP software will have problems if you try to create an intensive process at the same time. Depending on your server it could handle a few or hundreds or thousands, the answer is really different depending on how powerful your hosting plan or server is, but either way it’s not a good practice.
Creating new entries is usually an intensive task because it’s processing data entry and creating many things in the database. You should handle this with precaution on any server. Now 3 at the same time should be fine as long as you wait a bit between requests.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.