Hello.
Since I installed your the I’ve been getting a lot of this error message:
FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function get_header() in /public/public_html/wp-content/themes/Newspaper/index.php:6
Additionally I noticed a big CPU load.
We use nginx.
Kind regards
If you use nginx with php-fpm fastcgi running and have a high traffic website make sure to add
fastcgi_read_timeout 300;
to your nginx configuration despite of memory_execution_time.
That fixed the above error but now we see a lot of:
SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = 'logo.svg';
and
SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = '2017/10/logo-og.png';
in slow mysql queries and CPU usage against memory is very high(last night we had two 502 errors with cloudflare optimized).
Just letting you know everything was OK with another theme and 15 more plugins installed.
How to handle this?
Kind Regards
-
This reply was modified 8 years by
minamoto19.
-
This reply was modified 8 years by
minamoto19.
Hello minamoto19,
Please notice that the first step for WordPress debugging is to disable all of the untested plugins, clear all the caches and check the results. Please notice that each theme is different from each other and any untested plugin can break it. Also, if the problem is still there, you should make a new fresh install to another subdomain for testing and check the results.
Thanks for your understanding!
Hello.
Thank you for your response.
The only plugins running are:
Accelerated Mobile Pages
Cookie Notice
Inline Related Posts
Rating Form (Custom Plugin)
tagDiv Composer
tagDiv Multi-Purpose
tagDiv Social Counter
AMP MyTheme (Custom Plugin)
Yoast SEO Premium
Yoast SEO: News
We have removed over 15 plugins before installing your theme.
We have purge the whole cache 2-3 times since then.
Its weird that the slow query log reporting the logo fetch as slow query:
SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = 'logo.svg';
Any idea where is this called from so to hardcode it?
Kind Regards
Hello minamoto19,
Notice that we do not have any bad reports in this case until now, sorry! I suggest you make a new clean install to another subdomain for testing via FTP way, clear all the caches and check the results. Use the FTP way for theme updating because this is the surest method in this case. After you have followed this steps, check your results and see if the problem is still there.
Hope this helps and let us know how it goes!
Thanks for your understanding!
Hello.
I’ve already tried that.
There is no issue on a clean installation of the theme but that I knew already.
I had tested in localhost before activate.
I cannot replicate 300 users/min + robots in another domain.
Do you have any idea where is this coming from?
SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = 'logo.svg';
Kind regards
Hello minamoto19,
Sorry but please notice that come does not come from our theme. This rule comes from WordPress and MySQL database. Notice that we cannot provide custom services if you want to change some functionalities in this case, sorry!
Thanks for your understanding!
Hello.
Im pretty sure that this is not coming from wordpress exactly but from a query you are running in your theme.
I’ll dig deeper and report back.
Kind regards