I have a site that have some plugins, and one of those plugins (facebook for woocommerce) is loading until it returns a timeout error (504). I can change some constants in wp-config.php, but none of them works when I need to debug a timeout.
I tried to remove every configuration and file that I found from this plugin and then reinstall it, but the error is still there.
I tried to deactivate every other plugin, but woocommerce and the error is still there.
I looked for some debug plugins, but I only found plugins that change wp-config.php constants and do some logs at files. It is useless, I can do this.
I tried to put some "die" with messages in plugin's code, but nothing changed.
Server log just shows this:
x.x.x.x - - [09/Nov/2020:17:52:56 -0300] "xxxxx.com" "GET /wp-admin/admin.php?page=wc-facebook HTTP/1.1" 504 160 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0" "-"
I don't know what I can to do to debug this timeout, I've tried everything I know with the wordpress.
I solved by asking on plugin's forum: https://wordpress.org/support/topic/plugin-page-giving-timeout-504/#post-13687667
I just needed to activate WP_DEBUG and WP_DEBUG_LOG flags. I discovered the line that was breaking the site and then I could properly debug and find the problem.
Related
I deployed ingress controller to my kubernetes cluster. However when i'm trying to access the pod i get HTTP 503. So i've tried to find the problem by accessing ingress controller's logs:
kubectl logs controllername-nginx-ingress-controller-6f486779b5-dnm8k -n kube-system
the piece of the log file that i'm interested in, looks like this:
10.244.0.1 - [10.244.0.1] - - [10/Dec/2018:16:54:12 +0000] "GET /identity HTTP/2.0" 503 599 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36" 271 0.000 [] - - - - d7f7ffd22d584e4a5da2b0fa2fae5665
as you can see i see absolutely nothing interesting there. I'm wondering if it's the entire log message as i see a bunch of dashes and a guid value at the end.
Next i decided to enrich ingress' logfiles:
kubectl edit deploy -n kube-system controllername-nginx-ingress-controller
deployment document shows up and i want to add extra line to args section:
spec:
containers:
- args:
- /nginx-ingress-controller
- --v=5 < ------------ this line
- other arguments here
once i close the deployment document i see this message:
error: deployments "misty-marmot-nginx-ingress-controller" is invalid
so what i'm doing wrong? is the log message really complete, in the current form it doesn't describe the error one bit. also why i can't change the logging level?
The problem has appeared due to a formatting issue of editing nginx-ingress-controller Kubernetes resource and was successfully fixed as well. However, even though for the common researches by the community contributors I would recommend to take a look at the general Troubleshooting guideline for any related Kubernetes cluster issues and steps how to resolve them.
I have a new Eucalyptus installation and new Eucaconsole installation. I have created users with login profiles and passwords assigned and verified them as not expired and enabled.
No matter what account/user/pass I log into the console with (even invalid accounts) I am delivered to a password reset page. The password reset appears to work but when I then click on any other part of the console or the generate keys button I am logged out and the whole problem starts again. The freshly changed password is asked to be changed again. I'm seeing errors nowhere in my logs. I see this in the eucaconsole_nginx_access.log each time this occurs.
10.0.0.7 - - [09/Nov/2018:13:14:58 -0500] "POST /login?
login_type=Eucalyptus HTTP/1.1" 302 256 "https://cloud/" "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0"
10.0.0.7 - - [09/Nov/2018:13:14:58 -0500] "GET /managecredentials?
came_from=&expired=true&account=console&username=admin HTTP/1.1" 200
4447 "https://cloud/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14;
rv:63.0) Gecko/20100101 Firefox/63.0"
10.0.0.7 - - [09/Nov/2018:13:14:59 -0500] "GET
/static/4.4.4/html/help/console_manage_credentials.html HTTP/1.1" 304 0
"https://cloud/managecredentials?
came_from=&expired=true&account=console&username=admin" "Mozilla/5.0
(Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0"
Did I miss an important piece in my setup or is this some kind of bug. The fact that it happens even for invalid credentials and nonsense users that don't exist is an interesting detail but I haven't been able to make sense of it in a useful way.
FINAL: I abandoned this and rebuilt after the 4.4.5 release and all is working.
For admin users in an account, setting a password (e.g. euare-usermodloginprofile or euare-useraddloginprofile) should be sufficient to allow console access.
When you add non-admin users to an account they will not have permission to perform any actions until you grant access via iam policy. Using the console you can access the details for a user and use ADD ACCESS POLICY under GENERAL / PERMISSIONS. You can pick a predefined policy such as User access or Monitor access to get started.
http://docs.eucalyptus.cloud/eucalyptus/4.4.4/index.html#shared/console_user_detail_general.html
Piggybacking on Steve's response, this is what I do for the admin group of the account. Save the file as admin-policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": "*",
"Resource": "*",
"Effect": "Allow"
}
]
}
Then import the policy for the group. For example, my accounting group is isp-services and my admin group is isp-services-admins. Be sure your user it part of the group.
euare-groupuploadpolicy --as-account "isp-services" -g isp-services-admins -p AccountAdminAccessPolicy-isp-services-admins -f admin-policy.json
I'm trying to upload a zip file with 201 files which are page sections for Elementor. I can do it one file at a time if I extract the zip file but WP should be able to extract and install them all at once from the zip file. Tried Googling it but most of the answers pertain to upping the PHP max post size. This is set at 8M and the zip file is 373K. If I upload it from within Elementor it seems to hang and if I upload it through my templates it quickly refreshes and shows the same templates that were already there. Here is my system info:
== Server Environment ==
Operating System: Linux
Software: Apache
MySQL version: 5.5.56
PHP Version: 7.2.8
PHP Max Input Vars: 1000
PHP Max Post Size: 8M
GD Installed: Yes
ZIP Installed: Yes
Write Permissions: All right
Elementor Library: Connected
== WordPress Environment ==
Version: 4.9.7
Site URL: http://stevenbuick.co.uk/wordpress
Home URL: http://stevenbuick.co.uk/wordpress
WP Multisite: No
Max Upload Size: 4 MB
Memory limit: 64M
Permalink Structure: /%postname%/
Language: en-US
Timezone: 0
Debug Mode: Inactive
== Theme ==
Name: OceanWP
Version: 1.5.21
Author: Nick
Child Theme: No
== User ==
Role: administrator
WP Profile lang: en_US
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36
== Active Plugins ==
Elementor
Version: 2.1.6
Author: Elementor.com
Ocean Demo Import
Version: 1.0.9
Author: OceanWP
Ocean Extra
Version: 1.4.19
Author: OceanWP
== Debug ==
Errors: There are no errors to display
I've tried disabling all the other plugins but still no joy.
Any help would be greatly appreciated.
go to cpanel wp-config.php file and paste define('WP_MEMORY_LIMIT','256M'); this line bellow to define('WP_DEBUG', false);
and the upload zip file, it works.
Nor do nginx or php-fpm reports a error 500 output, In fact the 500 response is on the access log and not on the nginx error log. The script is running ok in my dev environment.
nginx version: nginx/1.6.2
PHP 5.5.19 (fpm-fcgi)
Tried this
catch_workers_output = 1
Restarted everything, still not working
nginx access log shows:
x.x.x.x - - [12/Dec/2014:19:25:08 -0200] "GET /merchant/customer/mobile/data?sEcho=1&iColumns=3&sColumns=%2C%2C&iDisplayStart=0&iDisplayLength=10&mDataProp_0=0&sSearch_0=&bRegex_0=false&bSearchable_0=true&mDataProp_1=1&sSearch_1=&bRegex_1=false&bSearchable_1=true&mDataProp_2=2&sSearch_2=&bRegex_2=false&bSearchable_2=true&sSearch=&bRegex=false&_=1418418256370 HTTP/1.1" 500 589 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36"
Note the 500 error, which should be on error.log and with the php trace that's is happening on other errors.
Any clues?
When PHP display_errors are disabled, PHP errors can return Nginx 500 error.
Take a look into your php-fpm logs, i'm sure you'll find the error there. With CentOS 7 :
tail -f /var/log/php-fpm/www-error.log
You can finally show PHP errors. In /etc/php.ini, change :
display_errors = Off
to :
display_errors = On
Hope it helps.
In case it helps someone else (Google brought me here), I had a similar problem (although in Apache, not nginx).
An older app I was installing was giving a 500 error with no output anywhere, in spite of every conceivable error logging setting turned to the most verbose level.
It turns out the problem was the controversial error-control operator, "#". As the red warning box in the docs states, no matter how verbose your logging is, if an #-prefixed command causes PHP to stop because of a typo, or because it is not available (say, because you have forgotten to install a critical module like php-mysql), PHP will exit with absolutely no indication as to why.
So, if you find yourself with a 500-error and no logs, check your codebase for "#" symbols.
Verify php-fpm service is running
sudo service php-fpm status
This will display the hostnames that can execute php.
Next edit php.ini to display errors. this will display errors on page..to make things easy to diagnose
sudo vim /etc/php.ini
then hit key [/] and type
display_errors
hit key [i] user arrow keys and backspace to set display_errors = on
then restart php-fpm service
On system type redhat /centos etc..
sudo service php-fpm restart
How do I block a user agent using nginx.
so far I have something like this:
if ($http_user_agent = "Mozilla/5.0 (Linux; Android 4.2.2; SGH-M919 Build/JDQ39) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22") {
return 403;}
this is from a similar thread on this stack overflow.
I run nginx as a reverse proxy for cherrypy server. I intend to filter a certain user agent using nginx alone but the above code doesn't work on my server.
is that the correct way to do this?
It wasn't included in any block in the nginx config. Should I add it to the "http" block or the "server" block
in order to block the specific user agent I included this code in the "server" block:
if ($http_user_agent = "Mozilla/5.0 (Linux; Android 4.2.2; SGH-M919 Build/JDQ39) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.169 Mobile Safari/537.22"){
return 403;
}
and it worked as expected.
If's are evil - use the map directive.
Directive if has problems when used in location context, in some cases
it doesn’t do what you expect but something completely different
instead. In some cases it even segfaults. It’s generally a good idea
to avoid it if possible.
Nginx Ultimate Bad Bot Blocker makes blocking bots easy with support for Debian / Centos / Alpine Linux / FreeBSD.