Forum Moderators: coopster & phranque

Message Too Old, No Replies

CGI concurrent connections limits on server

I'm honestly new to this

         

explorador

7:13 pm on Jun 2, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi webmasters, this is honestly new to me, my bad if this is basic stuff that I should know. I already searched and read before posting this question, will appreciate any help.

  • I have a set of websites on shared hosting
  • All of them use the same CMS written using PERL
  • No database MYSQL or Maria), it uses my own flat file database
  • I wrote all of it and works fast, absolutely zero problems
  • How much traffic? 2 of those websites can reach 1,000 - 2,000 (each), daily unique visitors
  • Never had any issues with traffic, as everything was made to be gentle on resources


The sites are fully dynamic, meaning every page is built on the fly (and really no issues). I can also turn on a feature for caching, where the pages are built on the fly and written to disk, then just loaded and printed for X period of time I want and then renew.

Here is the thing: for several years I hosted those websites on diff companies having no issues AT ALL, and never ever found a single mention on the hosting providers about CONCURRENT CONNECTIONS. I don't even know how many are available on the current hosting provider, or the past ones. Right now I'm considering moving these sites to a new hosting company, and two on my list mention these terms. Based on my readings it affects both Apache, PHP and Perl scripts, is this something to worry? being a custom made CMS based on Perl, I thought this was the right place to ask.

One particular shared plan offers 3 levels from low/basic to high/pro: 20, 25, and 35 concurrent connections as the limit.

Thanks in advance.

Brett_Tabke

7:39 pm on Jun 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



That is a new one to me too. I could see it on a site that gets millions of views, but not something getting 1-2k visitors a day.

Is there anything super non-standard about it? such as:
- a graphics site pulling loads and loads of images?
- tricky 'cache' issues where the scripts uses something like wget or curl to pull the page back off the server?

I'd almost think there is a coding bug somewhere. Ask the host for some log files detailing what concurrent connections means.

btw: if you switch the server to http/2, it can pipeline connections. So a request of a page, can send all the resources over the same connection (it is what I did here to speed things way up). That and Brotli Compression (both are easy to turn on in either apache or cpanel).

explorador

7:59 pm on Jun 2, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is there anything super non-standard about it? such as:
- a graphics site pulling loads and loads of images?
- tricky 'cache' issues where the scripts uses something like wget or curl to pull the page back off the server?

Nope, nothing non standard or tricky, pure text and jpgs, the pages are built on the fly. The cache I wrote it's as simple as printing the final page to a file, and then if cache is turned on, a script directly loads and prints the content of that file to the browser. All the content is also compressed either way.
I'd almost think there is a coding bug somewhere. Ask the host for some log files detailing what concurrent connections means.

I don't understand this bit. I got lost there. I'm not having any issues, just reading the specs on possible new shared web hosting options and suddenly found this thing described on a few "X concurrent connections on this plan", more on the others, etc.

Brett_Tabke

9:21 pm on Jun 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



>I'd almost think there is a coding bug somewhere

A configuration issue maybe. Keep Alive settings can affect 'concurrent' connection time.

Other than that, I just can't imagine a normal website bumping up against any limits on 2k uniques a day.

If there is a control panel, can you tweak apache settings?

Brett_Tabke

9:24 pm on Jun 2, 2022 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



> 20, 25, and 35 concurrent connections as the limit.

If you have control of the apache, man turn on http/2.
[docs.cpanel.net...]
It will cut your total connections by a bunch.
Also if you are running any standard libraries (jquery...etc), then point those at Google or other provider that allows open linking..

explorador

5:28 pm on Jun 3, 2022 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Solved. Thanks for the help Brett.

A configuration issue maybe. Keep Alive settings can affect 'concurrent' connection time.
True. I wasn't aware of this.

If there is a control panel, can you tweak apache settings?

Nope, it's configured by the admins on shared hosting at account level.

If you have control of the apache, man turn on http/2.

That's great info.

I know have a more clear understanding on what concurrent connections mean, sadly when I read at diff places they talked about diff things (CGI, others talked about PHP, and others talked specifically about http requests, so I was confused and due to reading "CGI", I wondered if my CMS would be affected as it's written on Perl.

Now I understand a connection (under this context) means a request over a script, and only 10/20 (depending the case) are allowed as per server configuration at the same time, every request outside this limit will be queued, put in wait list, and there is also a setting for how long processes can stay alive.

What confused me the most is, I never noticed any webhosting company talking about this regarding shared hosting, and felt curious when I found it right now while checking new options to migrate some sites. Turns out most keep a limit of 15/20 for a one website setup, and most keep a limit of 25 for multiple websites on the same account, and more for more complex configurations.

Turns out, 25 is ok for my CMS even for higher traffic.

Thanks again, it's solved.