Possible Nette database cache bug

Notice: This thread is very old.
Etruska
Member | 25
+
+1
-

Hi,
I'm having series of very weird problems which I believe are caused by some sort of bug in Nette Database caching. Sometimes page returns no response at all (Empty reply from server) and of course no entry in log. Sometimes page exits abruptly (transfer closed with outstanding read data remaining) at some point where database is accessed. These situations happen on different places, however are always (temporarily) solved by deleting _Nette.Database. cache folder.

I'm having this problem on localhost (OS X 10.3, PHP 5.5.19, Nette 2.2-rc1) but also at WEDOS webhosting which probably runs on Linux.

Any ideas how to solve this or even how to debug? Thanks.

dyamon
Member | 11
+
+1
-

This is possible problem with OPcache, if is enabled. You can try disable it. Put this line to your .htaccess file in www dir.

php_flag opcache.enable Off

Last edited by dyamon (2015-06-12 08:57)

Etruska
Member | 25
+
0
-

This unfortunately doesn't work on localhost and the directive is not supported on web hosting.

dyamon
Member | 11
+
0
-

Did you check if OPcache is enabled ? Using phpinfo(); ? Also you can try disable OPcache in php.ini on localhost. If you can't use .htaccess on your web hosting, you can contact support.

For your information, I had a similar problem on gigaserver.cz and active24.cz. While using Nette\Database or Tharos\LeanMapper the web page sometimes returned Error 502 no response. Problem was fixed by disabling OPcache.

Hosting Active24 actually published the solution of this problem.

Last edited by dyamon (2015-06-12 13:37)

gigaserver
Member | 1
+
0
-

Hi from gigaserver.cz!

I can confirm, that solution is disable it by php_flag. If you use our service, you can send email to support and we will disable it for you.

Nice weekend!

Etruska
Member | 25
+
0
-

I'm not sure this is the problem I'm having right now. On localhost I have no OPcache module installed (only soap.wsdl_cache directive, which imho shouldn't be related). My webhosting's PHP configuration currently looks like this: http://webcrafting.cz/phpinfo.php and although there is OPcache listed, I've been ensured by hosting admins that OPcache (XCache) is disabled.