Sirs,
1 - I would like to know what are the methods for analyzing and handling errors for sites with high traffic.
I'm working with a website that is in wordpress, and I've been faced with some errors every day.
Examples are:
Erro de banco de dados do WordPress Lock wait timeout exceeded; try restarting transaction para a consulta INSERT INTO 'wp_options' ('option_name', 'option_value', 'autoload') VALUES ('_transient_doing_cron', '1497992508.0405650138854980468750', 'yes') ON DUPLICATE KEY UPDATE 'option_name' = VALUES('option_name'), 'option_value' = VALUES('option_value'), 'autoload' = VALUES('autoload') feita por require('D:\home\site\wwwroot\wp-blog-header.php'), require_once('D:\home\site\wwwroot\wp-load.php'), require_once('D:\home\site\wwwroot\wp-config.php'), require_once('D:\home\site\wwwroot\wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, wp_cron, spawn_cron, set_transient, add_option
PHP Fatal error: Call to a member function have_posts() on null in D:\home\site\wwwroot\wp-content\themes\x\archive.php on line 75
I have no experience in handling errors, so I would like to know how best to analyze and handle errors through logs.
2 - Is there a more efficient way to find out which page generated the error?
What I have done is to go to the file and line that the log indicates, and analyze through table testing what happens. However, not all errors indicate a file. And these are the ones that I can not handle, when I do not know how to reproduce the error I end up not knowing where I should change to solve the problem.
I use php 5.6, I tried to use FirePHP
, it helped me a lot but only in cases where the log indicates file and line.
Is there a standard procedure? Is there a way to get more information about an error? How do I make sure that when an error is generated in the log, in addition to the standard information, it also contains the information I want ??
Example - User enters the page www.dominio.com.br and clicks a button that redirects him to the url www.dominio.com.br/teste.php that contains an error. I would like for any error, be written in the log: Default php + File path + Previous path to file:
Erro de banco de dados do WordPress Lock wait timeout exceeded; try restarting transaction para a consulta INSERT INTO 'wp_options' ('option_name', 'option_value', 'autoload') VALUES ('_transient_doing_cron', '1497992508.0405650138854980468750', 'yes') ON DUPLICATE KEY UPDATE 'option_name' = VALUES('option_name'), 'option_value' = VALUES('option_value'), 'autoload' = VALUES('autoload') feita por require('D:\home\site\wwwroot\wp-blog-header.php'), require_once('D:\home\site\wwwroot\wp-load.php'), require_once('D:\home\site\wwwroot\wp-config.php'), require_once('D:\home\site\wwwroot\wp-settings.php'), do_action('init'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, wp_cron, spawn_cron, set_transient, add_option
Caminho do arquivo que gerou o erro: www.dominio.com.br/teste.php
URL anterior ao erro : www.dominio.com.br/