Mister Denial Posted February 10, 2011 Share Posted February 10, 2011 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 1 Link to comment Share on other sites More sharing options...
Mister Denial Posted February 10, 2011 Author Share Posted February 10, 2011 Is anyone using FastCGI at all? Link to comment Share on other sites More sharing options...
Mister Denial Posted February 11, 2011 Author Share Posted February 11, 2011 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 More sharing options...
mytheory. Posted February 11, 2011 Share Posted February 11, 2011 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 More sharing options...
Mister Denial Posted February 11, 2011 Author Share Posted February 11, 2011 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 More sharing options...
Jonadabe Posted March 25, 2011 Share Posted March 25, 2011 Hi there,I will try with fastcgi but still, I don't know if it works. But what I found out it should.I will be back in some days! ;-)Thanks. Link to comment Share on other sites More sharing options...
mytheory. Posted March 25, 2011 Share Posted March 25, 2011 fastcgi works with PS.We are using mod_fcgid with apache on a linux box quite nicely. If this is the best, most optimized option... that I do not know. All I know is it works and we haven't had any problems.HTH! Link to comment Share on other sites More sharing options...
Jonadabe Posted March 25, 2011 Share Posted March 25, 2011 Hi there again,Do you use url rewrite? I looked and it seems that some are having problems with fastcgi and mod_rewrite. Do you have any problem with that?Thanks. Link to comment Share on other sites More sharing options...
mytheory. Posted March 25, 2011 Share Posted March 25, 2011 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 More sharing options...
Mister Denial Posted March 26, 2011 Author Share Posted March 26, 2011 I have successfully used both regular PHP5 and FastCGI, both work without problems. The question is, is there an advantage to using one or the other? Like performance increase? Link to comment Share on other sites More sharing options...
rudders18 Posted March 26, 2011 Share Posted March 26, 2011 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 More sharing options...
Mister Denial Posted January 23, 2012 Author Share Posted January 23, 2012 After some more experimenting with this, it turns out FastCGI seems to be the best choice. I also have the options to use IonCube and Sourceguardian, I'll try that too and see which combination brings the best results. Link to comment Share on other sites More sharing options...
chetwyn Posted July 18, 2012 Share Posted July 18, 2012 mod_fcgid has been the fastest mod for me. I'm also going to use eAccelerator. Link to comment Share on other sites More sharing options...
chetwyn Posted July 18, 2012 Share Posted July 18, 2012 this new site I've got is running fastcgi and it's lighting fast. http://www.iconhomeware.com.au/ 1 Link to comment Share on other sites More sharing options...
janthemanson Posted March 22, 2013 Share Posted March 22, 2013 How did you use fast-cgi with prestashop? Have it only be enabled? Where to place the prestashop installation to have prestashop use fast-cgi. Link to comment Share on other sites More sharing options...
tomerg3 Posted March 22, 2013 Share Posted March 22, 2013 FastCGI is an Apache (web-server) plugin, you do not need to do anything in Prestashop, just have your host enable it. Link to comment Share on other sites More sharing options...
janthemanson Posted March 22, 2013 Share Posted March 22, 2013 Ah, nice to know! Thank you! Link to comment Share on other sites More sharing options...
oliiix Posted March 22, 2017 Share Posted March 22, 2017 (edited) 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 I really was getting a huge amount of those in the past few days. Edited March 28, 2017 by oliiix (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts