How to fix server response time error showing in Google Pageinsights? - php

I have hosted my magento website on a VPS having 3GB RAM & 2CPU core. Even having free memory of approximately 1.9GB I am still facing server response time problems. I am using Apache web server.
Please help me to get rid of this problem.

Related

Application Pool hang and keeps loading

I have a problem. We have an in house server in our office. It's a super computer server running windows server 2016. Then we developed our own mobile app that's hosted on our in house server and we used PHP and IIS for web services for our mobile app.
Before it was running smoothly and then for some reason sometimes the Application Pool hangs like if I access the url API it's just keeps loading. I don't have any idea what's the problem. I added Worker Process and it works and I thought that's the solution. And then after 2 days we encountered same problem.
So every time it happens were down for 5 to 10 minutes. So I need to recycle or switch the application pool to another application pool so I can stop and start again the application pool that I used for that API.
BTW, the app we developed is for uploading of pictures and sending JSON base64 images with maximum of 8 pictures and we have 500 users.
Do you all guys any idea on how to resolve this problem? I'm struggling right now. Please I need help!

Receving 502 errors..please try again after 30 sec and frequent down of website throwing 502

I am having a Big Website with huge traffic from users, issue was server was not able to handle by the other hosting providers even though with dedicated server with 16 gb of ram and now with GCP i am having same issue with high configuration and Here with GCP i am having a virtual machine setup in Google Cloud Platform with 2 instance created and a load balancer enabled and also having Google Cloud CDN enabled. But Now i am getting 502 errors please try again after.. Please try again in 30 seconds. which is making me irritating and for my users also and the main thing is i am not able to figure out whats the reason of 502 error which is thrown by server.
I jsut wanted to know whats going wrong here ... Is it with the load balancer issue which is caused by server miss configuration and raising 502? and one more thing i am having Fast CGI enabled and Memory limit increased php ini(Website running on Apache server and its a CMS) file and max Imput connection was set with higher limit (No prob with this) or is it with the traffic of the website or bots hitting the website which is causing the server to crash and throwing 502 error or it is that GCP is not able to handle with lot of queries and php process limits.
frequent 502 errors - Server is up for some time and after some times it throws 502 error its repeating.
502 means Bad Gateway. It probably means your load balancer is not able to establish a connection with any of your web servers.
Can you try adding one or two more web server instances behind the load balancer? As long as your system is configured to allow multiple web servers, you should be able to add more instances fairly cheaply. They all need to talk to the same MySQL server for Joomla! to do its thing correctly.
You might also want to look at the load balancer traffic and error logs. You're trying to spot information about what went wrong when the load balancer tried and failed to hit a web server. Timeout? Refused connection? etc.
Are you using https? If so, is the load balancer terminating https and passing http along to the web servers? If you can set things up that way, it can reduce the web server workload a lot.
You might also consider switching from apache to nginx. It scales up better in high-traffic situations. But only do that as a cost-saving measure once you know that apache works OK with more web server instances behind the load balancer.

Internal server error 500 on wordpress on Apache server

I'm getting a 500 internal server error from time to time on a VPS server running Ubuntu 15.04 and Apache (installed like the perfect server here: https://www.howtoforge.com/tutorial/perfect-server-ubuntu-15.04-with-apache-php-myqsl-pureftpd-bind-postfix-doveot-and-ispconfig/)
The server has 5 Wordpress installs and the sites have no traffic to speak of as they're being deployed. The VPS is from digital ocean with the following specs: 1GBMemory, 1 CoreProcessor, 30GBSSD Disk, 2TBTransfer.
Can the resources be maxed out -- or is there a different explanation?
This is the error log from /var/log/apache2: http://pastebin.com/zVjJh8fP
Thanks in advance,
Kind reagards
It has to do with APC failing to allocate enough memory. Try lowering shm_size. But if possible increasing your memory would be a good idea.

IIS+PHP random Error 500.19

I'm running a WIMP stack on Windows Server 2012 R2 Standard, and I have a strange issue with IIS: After working for a random period of time (usually from several hours to days), most requests start to give the following error page:
What is weird is that it works for a period of time. Changing the user access settings of web.config or restarting the website both work to resolve the issue temporarily, however it's a recurring problem.
I do realise that WIMP is not the most desirable stack (normally I'd opt for LNMP myself), however our website will be migrated to an ASP.NET app soon, and since we had to do a server upgrade beforehand, we opted into installing Windows on it to make the transition faster.
EDIT: After some testing, changing the NTFS permissions result in getting the same error until the website is restarted. Might have to do something with the issue?
Also, I'm running the website with a pre-selected user rather than pass-through, if that helps.

Wordpress "Connection lost. Saving has been disabled" Error only when posting to Amazon EC2

This is happening everytime I try to write/submit new post to my wordpress site hosted on Amazon EC2 micro instance.
Error I get "Connection lost. Saving has been disabled until you’re reconnected. We’re backing up this post in your browser, just in case."
I started getting this error when I upgraded to Wordpress 4.0, as suggested on stackoverflow I downgraded to 3.9, it went fine for a month but again this problem has resurfaced.
I get connection lost and it is always followed by
"Error establishing a database connection"
My local host works absolutely fine(with exactly same site), never giving an error. It has to do something about Wordpress + Amazon.
I don't think it has to do anything with the Swap Memory or anything like that because I can easily make a post using Microsoft Word. Plus my site is fairly new with just 2 to 5 users at a time.
Please help me, this is annoying. I have to restart the server every time to get rid of this.
To be able to diagnose your problem, we would need more details
Where is running your database ? Is it on the same EC2 instance, another one or RDS ? What instance type are you using ?
A likely cause is a database memory problem. On t2.micro instances, there is not enough memory to keep the OS, the database and the web server running at the same time.
You'll have to create a swap file and add it to the OS (see "Stopping MSQL from crashing" in https://gist.github.com/rozeykex/7882972)

Categories