Jump to content

[Solved] FastCGI or not FastCGI


Recommended Posts

Hi there,

 

would you recommend using regular PHP5 or FastCGI on Bluehost shared account? Is PS coded with FastCGI in mind?

 

I got this reply form Bluehost support, so I am a bit unsure whether to turn FastCGI on in my account or not:

 

FastCGI keeps a process open, allowing any subsequent request for the same information to be delivered cached; However, FastCGI processes cannot share caches between each other; With a maximum lifetime of 5 minutes, and a total maximum idle time of 1 minute, the marginal increase in performance for subsequent hits

on a cached page are vastly overshadowed by the inefficiency of dealing with the caching overhead.

 

And finally, coupled with the fact that no more than 5 FastCGI processes can run at any time, you're looking at a serious bog down in response times if you start getting lots of traffic to many different php pages; You'd have to wait for all requests for one FastCGI process to timeout (300 seconds of active processing, or 60 seconds of idling) before the next FastCGI thread could be opened for the newly requested page.

 

 

Maybe someone can help me on that issue? Thanks in advance!

 

Regards,

 

Mister D

  • Like 1
Link to comment
Share on other sites

Sorry, to bump this up, but as most hosts offer the option to use FastCGI, I thought this might be of interest to many PS users. If we can get some additional performance just by changing a small setting, would it not be worth it?

So if any of the Devs or some PHP Expert has an idea about using FastCGI or not, that would be awesome.

Link to comment
Share on other sites

Hi,

This is a good question... especially the one about whether PS was geared towards FastCGI or not.

I know we use FastCGI, and answers to this question would have helped a lot when making that decision about year ago. To be very honest, I do not remember at all why we ended up deciding to go with FastCGI. I do know it wasn't from any recommendations for PS per say, but when doing research about this, it seemed like this was a better more efficient method for a webserver. Again, there weren't many considerations whether this would benefit our PS setup, but purely from a webserver point of view. More often then not when I was researching php5, fastcgi, webservers, etc... most people seemed to recommend fastcgi, unless you knew forsure you didn't need it for whatever reason.

Not much help I know.. but wanted through in my little experience, and bump.

Link to comment
Share on other sites

Hi mytheory,

I agree with you, when researching on the web, it looks like FastCGI would beat regular PHP5. HOWEVER, the reply from Bluehost Support makes me think that it's only useful if the software is coded to benefit from FastCGI. And that software that is not might even run slower or eat up server resources.

So I think this question, FastCGI or not, would really be worth a reply from someone on the Presta Team.

Link to comment
Share on other sites

  • 1 month later...

Nope... no rewrite problems. Again, we are using mod_fcgid and mod_rewrite.

I haven't noticed anything out of the ordinary... what kind of problems are we talking about?

I'm not an expert on rewriting rules, but we have the PS default rewriting rules and a few other rules from other applications we run. We haven't had any problems with this even with other application rewrite rules in the same .htaccess file.

HTH!

Link to comment
Share on other sites

I am using FastCGI and have had no problems, also using rewrite rules generated by PS plus a root based .htaccess with rewrite rules to redirect users to a subfolder when I have PS installed, this helps me upgrade or revert to an older version if I have a problem during an upgrade. The only problem I had using FastCGI is that you cannot have PHP directives in the .htaccess file and as I need to increase the maximum memory and execute times to allow users to upload large photos this proved a challenge.

Link to comment
Share on other sites

  • 9 months later...
  • 5 months later...
  • 8 months later...
  • 3 years later...

I'm currently googling about this topic because on my world4you (hoster) fcgi environment I'm getting a huge amount of internal server errors and if looking at the logfile i get this entry for every error:

 

[Wed Mar 22 11:27:23 2017] [error] [client 77.58.191.91] (2)No such file or directory: FastCGI: failed to connect to server "/fcgi-php-fpm-site1146": connect() failed, referer: http://www.whatever.tld/subdir/admin/index.php?controller=AdminProducts&token=9cb8d17ccbb027c24da55bfd095e4fbe&submitFilterproduct=1

 

The problem occurs from time to time on back end and front end. And if I'm working on several products at once (e.g. for uploading new product images/meaning I have multiple tabs open) the error occurs extremely often.

I'm going to ask my hoster now to switch to PHP as apache module. Hopefully I do not forget to update this post and tell you if that helped on the matter ;)

 

 

ANSWER EDIT:

My Hoster didn't want to change from FCGI to Apache Module and just adjusted some "server" values. When I asked for what exactly has been changed, unfortunately he didn't really tell me. All he told me was this:

 

We have only changed and increased some php processes/values and additionallly we've activated the FPM Handler as PHP Accelerator. What they also did was changing the PHP Version from 5.4 to 7...

My Site Now Works Flawlessly and without any of the Internal Server Errors :D I really was getting a huge amount of those in the past few days.

Edited by oliiix (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...