Currently Viewing Posts Tagged solution

php script timeout on php7.2-fpm and Nginx Webserver

Here is the background.

  • It is a php script that is accessed through a browser.
  • Server: Ubuntu 18.04
  • Web server: Nginx 1.14
  • php: php7.2-fpm

 

The script always stoped on 60 seconds.

The Nginx error log is shown below:

2019/10/23 14:05:18 [error] 996#996: *950 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 135.0.172.188, server: fctu.win, request: “GET /go/do-something.php HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php/php7.2-fpm.sock”, host: “mywebsite.com”

It is a timeout.  I knew it.

In the beginning, I am looking for the php timeout settings.

I tried to add max_execution_time to 360. It doesn’t help.

At last, I add a line into Nginx settings.

fastcgi_read_timeout 180;

Sample code below:

location ~ \.php$ {
    fastcgi_pass unix:/var/run/php7.2-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_read_timeout 180;
    include fastcgi_params;
} 

 

Hot to fix the problem on the new installation MariaDB

After the installation of MySQL server or MariaDB on Ubuntu, I would like to use phpMyAdmin or Adminer to access the MySQL server. But the first time the error comes like below.

Access denied for user ‘root’@’localhost’

mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’

MySQL connect error on phpMyAdmin

 

MySQL connect error on Adminer

Here is the solution to make the root connect to a server without error.

Continue reading “Hot to fix the problem on the new installation MariaDB”

Fix the warning of Event 1534 on Windows 10 build 1809

It is Windows 10 build 1809. In the Event Viewer, there are a lot of warning of event 1534.

The description of warning is either:

Profile notification of event Unload for component {B31118B2-1F49-48E5-B6F5-BC21CAEC56FB} failed, error code is See Tracelogging for error details.

or:

Profile notification of event Load for component {B31118B2-1F49-48E5-B6F5-BC21CAEC56FB} failed, error code is See Tracelogging for error details.

There is no fix on it. But a workaround to remove these annoying warning.

How to remove the warning of Event ID 1534?

1, Call the registry editor Regedit (with administrator privileges) and navigate to the following two registry entries.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\
CurrentVersion\ProfileNotification

and

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\
Windows NT\CurrentVersion\ProfileNotification

2, Then select the key TDL, export it for backup, then delete it.

To delete it, you can apply the Full access to Administrtors.

If you received the error like me above, you can also use the way below.

The ownership of the key TDL may have to be changed to Andministrators.

After restarting the system, the warning message should no longer appear in the event logs.

 

Fix the Warning of Event 64, CertificateServicesClient-AutoEnrollment

My Windows 10 is 1809. Recently I saw the warning in the Event Viewer.

Event 64, CertificateServicesClient-AutoEnrollment

Certificate for local system with Thumbprint be f9 b4 cd 1xxxxxxxx f4 df 51 is about to expire or already expired.

I did the search and find the way to solve this problem.

Before to do the following, I would like to make an announcement. It is just a warning. It will not affect your Windows System.

Right Click Start > Run > type mmc > press ENTER
On the File Menu > Click Add/Remove Snap-in > Click Certificates > Click Add
Click Computer Account > click Next
Click Finish > Click OK
In the console tree, Expand Certificates > Personal > Certificates
You should see the XBL Client IPsec Issuing CA
Right Click on it > All tasks > Export
Follow the Export Wizard > Export it as a x509 (.cer) > Give it a name (example: xbl-client-ipsec.cer)
Right Click on it > Delete > Confirm Delete
Close the mmc > Say NO when asked if you want to save Console

Now, the certificate is removed. This warning should not appear in the Event Viewer.

AS SSD Benchmark testing has Exception error on Windows 10

How to solve the problem of errors when running AS SSD Benchmark testing on Windows 10 pro? Here is how the error looks like:as-ssd-benchmark-error

 

It is not always happened. Click OK. The result is  done.  But, there are some testing files left in the c:\AS-SSD-TEST42\ folder. You can delete them manually.

If it happened, you just need to run the execute file with Administrator right.

ps: The picture above is from the Internet.

How to fix error Age of Empires 3 in Windows 10

It is an error when I tried to play my Age of Empires III game in Windows 10. I have the game which is installed on Steam platform. It is an old game, which is released  11 years ago, or 2005. I played it on Windows XP, Windows 2000, and Windows 7. Now I installed it on Windows 10. It gave me an error and closed.

I checked and fixed the error with two steps.

Step 1. The error of compatible mode.

I located the executive files and change the properties. age3y.exe

It is located on Steam library. Mine is D:\steam-games. So the files are in d:\steam-games\steamapps\common\age of empires 3\bin\

Right click on the file and choose properties, click Compatibility tab, make sure choose Windows XP (Service Pack 3) Compatibility mode and choose Run this program as an administrator.

aoe3-compatibility-mode Continue reading “How to fix error Age of Empires 3 in Windows 10”

[Fixed] Critical Error – Start menu and Cortana aren’t working.

It is just put me in attention when Gloria, my daughter told me that her Windows 10 has this error and can not do anything.

critical-error-win10

I did a lot of search and so many different answers.

Someone said it is because of the anti-virus program, Avast!. So remove it can fix the problem, but I don’t have it.

Someone said try other account to sign in. I tried it and still same problem.

 

Continue reading “[Fixed] Critical Error – Start menu and Cortana aren’t working.”

Webfont doesn’t shown in Firefox 22

I have a site which is using web font in css. It looks good in Chrome, IE, etc., except Firefox. It just shew a square with the number, something like F052.

I did a lot of search and it took me about 4 hours, until now I got the solution.
It is only happened on cross domain resource.
It is only happened on Firefox.
It is only happened when using CDN.

When I use Firebug to look at the pipe, the woff web font file is aborted. The url is corrected.

Catalin Rosu gave the solution in this post.

Firefox doesn’t allow cross-domain fonts

Continue reading “Webfont doesn’t shown in Firefox 22”

User Register Error on Joomla 3

If you search by error code: PHP Fatal error: Call to a member function where() on a non-object in /home/username/sitename/joomla/components/com_users/models/registration.php on line 521 and landed here, you are very closed to the solutions.

When a new user tried to register, he may received the 500 error. The real error information is behide it. So go to check the error.log file.

Then you will see the error infomation:

PHP Fatal error: Call to a member function where() on a non-object in /home/username/sitename/joomla/components/com_users/models/registration.php on line 521

Continue reading “User Register Error on Joomla 3”

Stop mt-comments.cgi to save memory

I can not publish new post in this blog. So many 500 error when I click publish, some times when I click signin.
The 500 internal error is because my blog, MovableType ate a lot of memory when it running. The Dreamhost is monitoring the resource user is using. It will kill the thread when it over the limit. Actually they don’t tell you the limit of it. They just tell you, it is time to upgrade to their VPS.
I connected the server through ssh. Run top command to see which one is more popular.
Yes, I found it. More than one mt-comments.cgi stay on the list.
To temporary solve the problem, I rename the mt-comments.cgi to other name. Then sign in the backend of MoableType.
Click Settings, Feedback, Uncheck the check box after Accept Comments.
Then, republish the whole site.

Continue reading “Stop mt-comments.cgi to save memory”

  • Archives