Author Topic: Session ID and Mysql tweaking.  (Read 3650 times)

0 Members and 1 Guest are viewing this topic.

Offline Naveen

  • Newbie
  • *
  • Posts: 43
    • View Profile
Session ID and Mysql tweaking.
« on: January 27, 2012, 07:23:22 AM »
Hi,

Turns out that my host does not like me much considering the amount of resources I have been using lately.

After few discussion and tweakings like cache, disabling random image / cat / hit counter etc, the gallery is running "ok".

The host says

Quote
At this point I am not seeing any running queries which are using excessive resources. Looking through old logs, all I can say is that the db_4images database has historically had the most performance issues. This appears to be related to keeping session data in the SQL database instead of as files.


I would like to disable session storage all together as I do not allow users to register on my site, it is just a gallery site managed by me only. The visitor has no role other than browsing the site. The site is currently running on cache.

Can this be done?

I would also like to disable any other insert/update queries if possible to reduce the load further.

Regards,
Naveen

Offline Naveen

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: Session ID and Mysql tweaking.
« Reply #1 on: February 03, 2012, 01:42:21 PM »
OK ... So I got banned again .. and I seriously need some help here.


The reason that your account keeps hitting MySQL limits is due to the number of "Rows Read" from the database "xxxxx" as well as the IO being generated by the constant updates on the database "xxxx".

What can be changed to make 4 images use minimal queries ... and if sessions can be saved as files?

I use 4images as a gallery section and do not need all the features which are provided, just browsing.

Rembrandt

  • Guest
Re: Session ID and Mysql tweaking.
« Reply #2 on: February 03, 2012, 05:49:50 PM »
Hi!

first, search in includes/constants.php:

// define("PRINT_STATS", 1);
// define("PRINT_QUERIES", 1);

and replace:

 define
("PRINT_STATS"1);
 
define("PRINT_QUERIES"1);

now you can see under your homepage, below the footer, how many SQL querys and what for querys.

the next question is, what modifications they have built in your galerie?´
and in ACP you can set the session timeout higher (ACP/General/Settings/Session and User Settings/Session timeout in minutes).

mfg Andi