\nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 13 byte(s) into a 25165824 byte DataBlock ERROR
Hi Guys,
I am running a wordpress site on nginx+fastcgi+hhvm on Ubuntu 14.04.1 LTS.
I am getting this error and a white page as well..1-2 times a week. When i restart the hhvm service the site works again.
What i should to to resolve the problem???
Here is a part of the error.log
[Sun Jan 25 16:04:59 2015] [hphp] [10014:7fa6ac3ff700:5792:000004] [] SlowTimer [3161ms] at runtime/ext_mysql: slow query: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_timeout_essb_mail_1089', '1422195296', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
[Sun Jan 25 16:05:01 2015] [hphp] [10014:7fa69abff700:5649:000004] [] SlowTimer [2146ms] at runtime/ext_mysql: slow query: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_timeout_essb_google_http://www.e-mama.gr/alithino-telos-apo-kathe-paramithi/', '1422195299', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
[Sun Jan 25 16:05:05 2015] [hphp] [10014:7fa69ffff700:5782:000004] [] SlowTimer [7320ms] at runtime/ext_mysql: slow query: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_timeout_essb_print_1089', '1422195297', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
[Sun Jan 25 16:05:06 2015] [hphp] [10014:7fa6ac3ff700:5792:000005] [] SlowTimer [7407ms] at runtime/ext_mysql: slow query: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_essb_mail_1089', '0', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
[Sun Jan 25 16:05:06 2015] [hphp] [10014:7fa69abff700:5649:000005] [] SlowTimer [5589ms] at runtime/ext_mysql: slow query: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_essb_google_http://www.e-mama.gr/alithino-telos-apo-kathe-paramithi/', '0', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
[Sun Jan 25 16:05:09 2015] [hphp] [10014:7fa6ac3ff700:5793:000001] [] SlowTimer [1852ms] at runtime/ext_mysql: slow query: SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('nav_menu') ORDER BY t.name ASC
[Sun Jan 25 16:05:09 2015] [hphp] [10014:7fa69abff700:5650:000001] [] SlowTimer [1855ms] at runtime/ext_mysql: slow query: SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN ('nav_menu') ORDER BY t.name ASC
[Sun Jan 25 16:05:09 2015] [hphp] [10014:7fa69ffff700:5782:000005] [] SlowTimer [4873ms] at runtime/ext_mysql: slow query: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_essb_print_1089', '4', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
[Sun Jan 25 16:20:55 2015] [hphp] [10014:7fa6a47ff700:5651:000004] [] \nFatal error: entire web request took longer than 900 seconds and timed out in /var/www/e-mama.gr/htdocs/main/wp-content/plugins/updraftplus/includes/Google/IO/Abstract.php on line 256
[Sun Jan 25 19:14:28 2015] [hphp] [10014:7fa69abff700:6287:000001] [] SlowTimer [5740ms] at runtime/ext_mysql: slow query: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_essb_google_http://www.e-mama.gr/ftiaxe-bogies-gia-facepaint-3-ilika/', '0', 'no') ON DUPLICATE KEY UPDATE `option_name` = VALUES(`option_name`), `option_value` = VALUES(`option_value`), `autoload` = VALUES(`autoload`)
[Sun Jan 25 19:14:28 2015] [hphp] [10014:7fa6ac3ff700:6421:000001] [] SlowTimer [5507ms] at runtime/ext_mysql: slow query: UPDATE `wp_options` SET `option_value` = '1422206663' WHERE `option_name` = '_transient_timeout_essb_print_4614'
[Sun Jan 25 19:14:28 2015] [hphp] [10014:7fa69ffff700:6439:000001] [] SlowTimer [5536ms] at runtime/ext_mysql: slow query: UPDATE `wp_options` SET `option_value` = '1422206663' WHERE `option_name` = '_transient_timeout_essb_mail_4614'
[Sun Jan 25 19:14:28 2015] [hphp] [10014:7fa6a47ff700:6177:000001] [] SlowTimer [3575ms] at runtime/ext_mysql: slow query: UPDATE `wp_options` SET `option_value` = '41401' WHERE `option_name` = 'slimstat_visit_id'
[Mon Jan 26 09:26:40 2015] [hphp] [10014:7fa6ac3ff700:8409:000001] [] \nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 16 byte(s) into a 25165824 byte DataBlock with 1 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.
[Mon Jan 26 09:26:41 2015] [hphp] [10014:7fa69ffff700:8444:000001] [] \nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 13 byte(s) into a 25165824 byte DataBlock with 1 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.
[Mon Jan 26 09:26:43 2015] [hphp] [10014:7fa69abff700:8267:000001] [] \nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 13 byte(s) into a 25165824 byte DataBlock with 1 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.
[Mon Jan 26 09:26:44 2015] [hphp] [10014:7fa6ac3ff700:8410:000001] [] \nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 13 byte(s) into a 25165824 byte DataBlock with 1 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.
[Mon Jan 26 09:27:53 2015] [hphp] [10014:7fa6a47ff700:8168:000001] [] \nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 13 byte(s) into a 25165824 byte DataBlock with 1 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.
[Mon Jan 26 09:27:57 2015] [hphp] [10014:7fa69ffff700:8445:000001] [] \nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 13 byte(s) into a 25165824 byte DataBlock with 1 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.
[Mon Jan 26 09:28:11 2015] [hphp] [10014:7fa69abff700:8268:000001] [] \nFatal error: unexpected N4HPHP13DataBlockFullE: Attempted to emit 13 byte(s) into a 25165824 byte DataBlock with 1 bytes available. This almost certainly means the TC is full. If this is the case, increasing Eval.JitASize, Eval.JitAColdSize, Eval.JitAFrozenSize and Eval.JitGlobalDataSize in the configuration file when running this script or application should fix this problem.
It looks to me as though you're running out of space in the translation cache. Have you tried increasing the runtime options mentioned in the error message?
I tried this in the /etc/hhvm/server.ini (Using this as guideline https://github.com/facebook/hhvm/wiki/INI%20Settings)
hhvm.jit_a_size = 536870912 hhvm.jit_a_cold_size = 268435456 hhvm.jit_a_frozen_size = 536870912 hhvm.jit_a_prof_size = 536870912 hhvm.jit_a_max_usage = 536870912
I will inform you tomorrow with a new error log.
Unfortunately this is "perfectly normal" with all HHVM versions. You can set the jit sizes to a higher value (like you already did) and that will extend the time periods between the crashes, but doesn't solve it. This has been a bug for almost a year now, never gets addressed :( I wish I could help with finding a solution for this, I tried, repeatedly.
@MarkGavalda I can understand your frustration. These crashes are something that we're working on resolving. Unfortunately the TC isn't currently resizable and does not recycle bytes from dead translations. It's definitely a major pain point and we're working to address it.
@paulbiss please don't get me wrong, I love HHVM and I spread the word every day as much as I can! And we can't thank you guys enough for open sourcing it and starting a renaissance of PHP :) It's just frustrating because we have large clients with whom we keep running into this particular issue almost every day and we have to do all kinds of black magic to keep HHVM running (well, restarting) because when the TC gets full it doesn't crash so that supervisor could restart it, it just starts not responding or sending error 500s.
@MarkGavalda We are having the exact same issue and are handling large amounts of requests daily. Almost daily we are receiving alerts letting us know that a server has gone down. Once we restart HHVM everything works normal, for a little while. Just like you, I love HHVM and will be using it for a long, long time but this issue has to get fixed. It hasn't stopped us from serving requests, thankfully because we are load balanced, but it's still a pain to restart HHVM on servers when we get an alert.
I have the same issue as well, but I don't believe it ever cropped up for the Magento environment I manage until I upgraded to version 3.5.1.
I'm running HHVM as hhvm --mode server and this is the only fatal error I'm encountering in the logs. Is there a way to force the process to terminate, so I can let other instances take over the request?
I am seeing this behaviour on HHVM/3.7.0. If this error is unrecoverable, HHVM should exit (with some error exit code) so the init/supervisor daemon (upstart, supervisord, systemd, whatever) can launch a new instance of it. What I am seeing instead is that the process keeps running, users see blank pages (as HHVM fails while rendering the page) and a never ending succession of fatal errors are printed to the logs.
Obviously the first thing to try here is to just increase the sizes suggested in these options, however, in a couple of specific cases this may not work. If you aren't running master you may want to setting Eval.JitPseudomain=false (or hhvm.jit_pseudomain=false for ini) may help, under certain pathological conditions we can end up creating many many short retranslations of pseudomains.
Modifying PHP while the server is still running can also sometimes lead to these crashes, in this case setting Eval.EnableReusableTC=true (hhvm.enable_reusable_tc=true) may help.