Denne utvidelsen har ikke blitt testet mot noen av de siste 3 hovedutgivelsene av WordPress. Den er kanskje ikke lenger holdt vedlike eller støttet, og den kan ha kompatibilitetsproblemer med nyeste versjoner av WordPress.

Hagakure – Yet Another Error Reporter

Beskrivelse

Have you ever seen an error log like below?

PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted (tried to allocate xxx bytes) in /var/www/wordpress/wp-includes/wp-db.php on line 2007

This means that PHP memory limit is exhausted while retrieving data from database. In many case, this happens when your site has big data and making insane loops inside.

But we want to know that which plugin tried to retrieve data?

Hagakure adds extra information to error.log file when wp-db.php causes memory limit error:

[08-May-2019 10:28:37 UTC] wpdb Error Backtrace:
#1      Kunoichi\Hagakure\DbLogger->filter_query()      /app/public/wp-includes/class-wp-hook.php       Line 286
#2      WP_Hook->apply_filters()        /app/public/wp-includes/plugin.php      Line 208
#3      apply_filters   /app/public/wp-includes/wp-db.php       Line 1871
#4      wpdb->query()   /app/public/wp-includes/wp-db.php       Line 2579
#5      wpdb->get_results()     /app/public/wp-includes/class-wp-query.php      Line 2979
#6      WP_Query->get_posts()   /app/public/wp-includes/class-wp-query.php      Line 3387
#7      WP_Query->query()       /app/public/wp-includes/post.php        Line 1961
#8      get_posts       /app/public/wp-content/plugins/hagakure/hagakure.php    Line 34
#9      {closure}       /app/public/wp-includes/class-wp-hook.php       Line 286
#10     WP_Hook->apply_filters()        /app/public/wp-includes/class-wp-hook.php       Line 310
#11     WP_Hook->do_action()    /app/public/wp-includes/plugin.php      Line 465
#12     do_action       /app/public/wp-includes/template-loader.php     Line 13
#13     require_once    /app/public/wp-blog-header.php  Line 19
#14     require /app/public/index.php   Line 17

This log will always follow memoly limit Fatal Error by wp-db.php. Now you can find #8 calls get_posts repeatedly.

We recommend to watch logs with notification services like CloudWatch Logs.
This error occurs on the productional environment and you may not have chanses to see it occurs.
We use Hagakure with our hosting service, please looking forward to see our blog published and describing about the integration!

Installasjon

  1. Upload hagakure folder to the /wp-content/plugins directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. That’s it. This plugin will work as background.

FAQ

How can I contribute?

We host this plugin on GitHub kuno1/hagakure. Please feel free to send PRs or to make issues.

Vurderinger

10. mai, 2019
This plugin makes it easy to find the root cause of PHP Fatal error: Allowed memory size of xxxxxx bytes exhausted error. AWESOME.
Les alle 2 vurderinger

Bidragsytere og utviklere

“Hagakure – Yet Another Error Reporter” er programvare med åpen kildekode. Følgende personer har bidratt til denne utvidelsen.

Bidragsytere

“Hagakure – Yet Another Error Reporter” har blitt oversatt til 1 språk. Takk til oversetterne for deres bidrag.

Oversett “Hagakure – Yet Another Error Reporter” til ditt språk.

Interessert i utvikling?

Bla gjennom koden, sjekk ut SVN-repositoriet, eller abonner på utviklingsloggen med RSS.

Endringslogg

0.8.0

  • first Release.