![]() |
|
mysqli errors - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: mysqli errors (/thread-13290.html) Pages:
1
2
|
mysqli errors - ctdlg - 2019-06-19 Hello, With 1.5.3, I often get mysqli errors. EXCEPTION (0): Call to a member function real_escape_string() on boolean in zp-core/functions-db-MySQLi.php on line 155 WARNING: mysqli_connect(): (42000/1203): User already has more than 'max_user_connections' active connections in zp-core/functions-db-MySQLi.php on line 29 This happens when working on new albums/pictures, not while looking at pictures. mysqli errors - ctdlg - 2019-06-19 Errors are generated when working with image cache. My mariadb was automatically upgraded (version : 10.2.25) recently. I will ask my host why they upgrade this db ! mysqli errors - acrylian - 2019-06-19 Did you try to lower the cache concurrency on the image options as I mentioned on another topic? Also it is important what method for caching you are using (cURL or classic way). Generally pre-caching is a massiv task causing lots of server load and that grows with the number and size (dimensions) of the images processed. As mentioned before t is technically not necessary as Zenphoto will cache any image size when requested the first time. Even if that causes some delay for the first time visitor. mysqli errors - acrylian - 2019-06-19 We don't/can't test MariaDB specifially but according to its info it should be generally compatible with the matching MySQL versions and not the problem here. mysqli errors - ctdlg - 2019-06-20 I just reduced the cache concurrency. And I'm not using cURL anymore. I will see with next photos I'll add. mysqli errors - acrylian - 2019-06-20 Btw, for your interest here is how the cacheManager is meant to work in cURL mode but sadly does not everywhere: https://www.zenphoto.org/screenshots/various/cachemanager-curl-mode.m4v.html mysqli errors - Tobias - 2019-06-24 I can confirm this for MySQL.
These are from Zenphoto version 1.5.1. mysqli errors - acrylian - 2019-06-24 Please first upgrade (current is 1.5.4) and also try the options mentioned above. Otherwise we need an exact description when and under what circumstances this happens like using the cacheManager with what settings, how many images, how large (dimensions NOT file size!) are used etc. Just the usual information. mysqli errors - Tobias - 2019-06-24 I already upgraded to the latest version and will keep an eye on this. Have you considered using a Singleton pattern for the database connection to prevent situations where the connection isn't closed properly before creating a new connection? mysqli errors - acrylian - 2019-06-24 We will not use an actual singleton but the planned major release will have this area reworked a bit. But I will review the missing check you mentioned as I had the impression there is a check with that global. That would probably be an oversight. mysqli errors - acrylian - 2019-06-24 It would be interesting on what occasions you get this. But I see I think. At least the db_connect() functions of each db lib should check if the same db connection is already open with the global. I will take a look at this as soon as I can. mysqli errors - Tobias - 2019-06-24 I'd be interested as well to know when this happens, but although it's happening quite often, I cannot see a regular pattern. Sometimes it's gone for quite some time before it shows up again in the logs. mysqli errors - acrylian - 2019-06-24 Let me know if you find anything to reproduce it. I never saw this neither locally nor on our own site or demo. mysqli errors - ctdlg - 2019-06-24 Hello, I also upgraded to 1.5.4 recently. Problem is only with admin pages, albums settings. I did several tests, problem only occurs on albums containing many pictures. I can reproduce the problem, so, if you want more info ... mysqli errors - acrylian - 2019-06-24 Please post any info you can find. As mention I never saw this error and on my local install for instance I have lots of albums anad images for testing. Simply said: If a mysql host, say, allows only 10 connections at the same time and you have 11 visitors at the time, that will exceed since every visitor has its own instance. According to the docs the default values is normally 151. So if that is the case this is a server limitation we cannot do anything against. Even adding the probably missing checks discussed above will not help here then. mysqli errors - ctdlg - 2019-06-25 I only get mysqli errors with albums administration, otherwise, no mysql errors (never) Starting point : I empty the debug log I enter the albums page :
I check the logs :
I enter Nouveautés album :
I check the logs :
Nouveautés is a dynamic album. O2switch is my host. mysqli errors - ctdlg - 2019-06-25 Here is the setting of this dynamic album : words=*&searchfields=title&inalbums=0&inimages=1&unpublished=0 I also get errors with some other albums. Please note I do not even have a look to images sub-page. And displaying an admin album page that creates a mysqli problem is quite long, server seems busy. mysqli errors - acrylian - 2019-06-25 Two questions:
I can only again tell that I never saw these and I have a large dynamic test album locally (contain hundreds of images as it just searches for all "jpg" files). Dynamic album handling to my memory did not change since 1.5.1 and even earlier at all. mysqli errors - ctdlg - 2019-06-25 Hello acrylian, Some answers : Now, there is no delay when opening any admin album page. I probably missed something when I enabled those settings one year ago ! Thank you very much. mysqli errors - acrylian - 2019-06-25 Glad something worked out for you!
Actually I recommend to enable the search cache if you use dynamic albums extensively. It should help performance as the search queries do not need to be performed every time. Regarding 2 I have to look if that is default or not. It does not hurt if you have a few images and few album levels. But the more you have the more it costs. As mentioned we will rework this selector completely which should solve this and 3 in one go. Also could you two please check the |