TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 29, 2024, 11:12:51 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,174
  • Total Topics: 21,220
  • Online today: 152
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 80
  • Total: 80

Urgent: Connecting problem to database !

Started by hartiberlin, December 21, 2006, 04:35:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hartiberlin

Hi All,
I am running at
www.overunity.com
SMF 1.1.1 with TP 0.97 and Admod 1.1V2



I now have again the database access problem,
but this time the error is:

Database Error: User 'hartiberlin1' has exceeded the 'max_updates' resource (current value: 30000)
File: /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php
Line: 2536

The Techsupport guy writes:

Hello Stefan,

Mind you it is the max_updates where the limit is reached not the max_questions. It is not normal to have that many updates, even for that many pageviews. A busy website will normally only use many questions and only a few updates.

Please check your scripts again to see where the update queries are used.


Kind regards,
Allan, Servage Hosting

===============

What could generate this huge
'max_updates' value ?

When is this parameter being increased ?
Only if somebody posts a message in my forum
or what exactly is it ?

How can I check, which user is generating this huge
'max_updates' value ?

Could it be, that somebody tries to hack my
admin password with a brute force program ?

Please help.

Many thanks.

Regards, Stefan.
 

G6Cad

The only thing i can think of is if you have RSS feeds in an article or in a block, or some mod that update often, A javascript that keeps refreshing or some thing.

hartiberlin

Hmm,
I have RSS enabled, should I disable it in the admin area ?

Also I have a clock in a TP block at the side
and also Google adsense and Amazon skyscraper ads
in TP blocks at the side boarders of my forum
an a Kontera.com Content-add Javascript , that checks the site
for content words and double marks them and users
can then click these keywords for adds..

Hmm, my Techsupport writes:

Hello Stefan,

Sql updates are INSERT, UPDATE and REPLACE statements.

Sql questions are all statements.

So, what should I change ?
Could it just be a brute force attack from someone,
who tries to get the admin password ?

Many thanks.

Regards, Stefan.

hartiberlin

P.S: normally every page of my forum generates
about 19 to 35 queries to the database,
but what exactly makes accesses to this
'max_updates' value ?

How could I check this out, which Block
might increase this value, so I could disable it ?

Many thanks.

gerrymo

First, make sure in admin you are not using a persistant connection. It's not needed.

If its not that, try turning off RSS.

hartiberlin

Many thanks ,
another guy at the SMF site answered:

--------------------------------------
SMF does quite a few updates to various tables such as sessions and log_online with each page view, you could reduce it a bit by disabling db driven sessions, but your best bet is to find a real host that doesn't impose pointless stupid limits like this.

---------------------------------------------
Where do I find this setting ?
In the Admin area ?

I have the problem, that I can not even access the ADMIN
section anymore.

How could I disable the forum via FTP, so that only me can access
the forum and I could change things in the admin section ?

Many thanks.

hartiberlin

In the error log in maintainance section in admin section I also
always get error messages, that
emails did not get send like this:

pxxxse   Today at 03:48:02 PM 
84.173.52.157    65982b50db210aad7d1abb7ee3743b87 
http://www.overunity.com/index.php?action=post2;start=920;board=49 
Unable to send mail to the email address 'lhaxxxxx@flite.net'

What could have caused this error ?

There are now about 30 error pages about emails not sent...
hmm...

G6Cad

The email issues you have are simply mails that didnt had the correct adresses or similar, so the mails were never answerd to or didnt had a destination that were correct.
Many users just type in a fake adress when they registerm and those fake adresses are the ones that returns in the error log when you mass send news or news letters.

To prevent this you can set your registration to email validation, it means that the users that wants to registerm have to validate their emal to show that they have a valid email adress, or they simply wont be allowed in to the forum.

ianus

#8
Greetings!

First, I donÃ,´t know a reason why 'max_updates' exeeds.

Second.
Quote
How could I disable the forum via FTP, so that only me can access
the forum and I could change things in the admin section ?

Download and open your ââ,¬Å"settings.phpââ,¬Â
In line 26, you will find
$maintenance = 0; # Set to 1 to enable Maintenance Mode, 2 to make the forum untouchable. (you'll have to make it 0 again manually!)
Change =0 to =1 and only an Admin is able to log in.


Third:
To disable db driven sessions use your board.
Path is Admin -> Server Settings -> Feature configuration
There your will find ââ,¬Å"Use database driven sessionsââ,¬Â.

To disable RSS
Got to News and newsletters -> settings

A short view to your sig.
The Savage offer sounds nice, but a quick search bring up this
http://www.joomlaportal.de/allgemeine-fragen-zu-joomla/70967-sql-max_updates-bei-servage.html

I think, you understand German?
Well, then there is another link. Here you will find a Bot-Trap, a smal php script to prevent access from a huge range of IPÃ,´s and bots
http://www.bot-trap.de
Only to make sure, you are not under an attack.

Also, to your last post.
Flite . net offers webhosting an dial up services.
Imho sombody, or al lot of somebodys are spamming your board.

You should activate Captcha for registration.
Path is Admin -> Registration -> Settings and you will find
ââ,¬Å"Disable the use of the visual verification an registrationââ,¬Â

Under the same path you find the ââ,¬Å"Method of registrationââ,¬Â.
Set it to ââ,¬Å"Member activationââ,¬Â an the SMF send an e-mail to proof if its real, like G6 mentioned
At the moment, I would prefer ââ,¬Å"Member Appovalââ,¬Â. In this case, you have to allow the new user or not. This is not comfortable, but for a short timeââ,¬Â¦


IÃ,´m sorry, but thatââ,¬â,,¢s all I can do for you.

gerrymo

I know the previous hosts. I used to be with them, runing a very busy board. I had no problems like this at any time. I feel there may be something wrong on the Installation, rather than the server. But what? I have no idea.

hartiberlin

Many thanks for the answers,
I will try to do so,
but:

Hi,
I have now since over 1.5 hours set my forum at
overunity.com
into Maintainance mode,
so that nobody can surf in my forum,
but the counter does not go down !


It still displays:

: User 'hartiberlin1' has exceeded the 'max_questions' resource (current value: 90000)
/mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php
1993


Could there  be something wrong with this counter ?

Or are users trying to surf, also making database accesses this way ?

hartiberlin

I renamed now the index.php file to a different name,
but the limit counter does not go down, also after almost 3 hours....

It still displays:

: User 'hartiberlin1' has exceeded the 'max_questions' resource (current value: 90000)
/mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php
1993


So could it be, that my hoster has a nonworking limit counter ?

As nobody knows the new name of the index.php
file, there are now no accesses to the database anymore, but
the counter does not go down....

IchBin

What else you running on your site? Could be something else causing the hit.

ianus

#13
Greetings!

Have a look into your Admin panel, go to ââ,¬Å"Server Settingsââ,¬Â and find ââ,¬Å"Use a persistent connectionââ,¬Â.

The ââ,¬Å¾max_questionsââ,¬Å" als well as the, first mentioned ââ,¬Å¾max_updatesââ,¬Å" a MySQL settings and your host can set them to whatever they want.
As far as I know, there is a counter, which is reset after an hour. But itÃ,´s also possible that this is set to one day.
Your host is able to reset this counter with ââ,¬Å"FLUSH PRIVILEGES;ââ,¬Å". Maybe you can ask, if he can do it for you in this case.

I think, for example, if a lot of users are login in and out in a short time, the ââ,¬Å"max_updatesââ,¬Â value could be reached, especially when always an error is written because of the missing possibility to send an e-mail. Imho the tables ââ,¬Å"smf_log_onlineââ,¬Â and ââ,¬Å"smf_log_errorsââ,¬Â are updatet, so the max_updates could be reached.
This is only a guess.

Other software is interesting anyway, and for how long you work with it. I donÃ,´t know this for example
QuoteKontera.com Content-add Javascript , that checks the site
for content words and double marks them and users
can then click these keywords for adds.


Last and a little bit of topic. I donÃ,´t want to blame the host. I donÃ,´t know him and I donÃ,´t to jugde him. The host is only one point in an try and error game to solve the problem.

hartiberlin

#14
Okay, I now had enabled the queries log at the bottomof the forum and this
is, what is displayed, when I call up my homepage as the admin:

Powered by SMF 1.1.1 | SMF Ã,© 2006, Simple Machines LLC
TinyPortal v0.9.7 Ã,© Bloc | Azure design by Bloc
Page created in 0.141 seconds with 34 queries. 

Loading...Templates: 3: index (azure_11final_tp), TPortalBlocks (default), TPortal (default).
Sub templates: 4: init, main_above, main, main_below.
Language files: 3: index.english (default), Modifications.english (default), TPortal.english (default).
Files included: 11 - 473KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/LoadAds.php, ./Sources/TPortal.php, ./SSI.php, ./Sources/TPmodules.php)
Queries used: 35.

         SELECT variable, value
         FROM smf_settings
   which took 0.003124 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '164c3f300sfdf38889387a5abeb4205'
      LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 1993, which took 0.00446391 seconds.

            SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.ID_MEMBER = 2)
            WHERE mem.ID_MEMBER = 2
            LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 390, which took 0.00337911 seconds.

         SELECT variable, value, ID_MEMBER, ID_THEME
         FROM smf_themes
         WHERE ID_MEMBER IN (-1, 0, 2)
            AND ID_THEME IN (5, 1)
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 1169, which took 0.00119805 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 33, which took 0.00109887 seconds.

            DELETE FROM smf_log_online
            WHERE logTime < NOW() - INTERVAL 1200 SECOND
               AND session != '164c3f3007b54b38889387a5abeb4205'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php line 2513, which took 0.00076079 seconds.

         UPDATE smf_log_online
         SET logTime = NOW(), ip = IFNULL(INET_ATON('172.180.81.86'), 0), url = 'a:2:{s:6:\"action\";s:6:\"login2\";s:10:\"USER_AGENT\";s:83:\"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ; ; .NET CLR 2.0.50727)\";}'
         WHERE session = '164c3f3007b54b388893dfgdfgabeb4205'
         LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php line 2521, which took 0.00071216 seconds.

      UPDATE smf_members
      SET
         lastLogin = 1456456663453450,
         memberIP = '172.180.23.86',
         memberIP2 = '172.180.23.86',
         totalTimeLoggedIn = 2462785
      WHERE ID_MEMBER = 2
      LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php line 634, which took 0.00084996 seconds.

SELECT name,value FROM smf_tp_settings
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 110, which took 0.00105381 seconds.

SELECT grp.onlineColor FROM (smf_members as m, smf_membergroups as grp)
         WHERE m.ID_GROUP=grp.ID_GROUP
         AND ID_MEMBER=2 LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 150, which took 0.00074005 seconds.

SELECT count(*) FROM smf_tp_variables WHERE type='art_not_approved'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 208, which took 0.00144887 seconds.

SELECT count(*) FROM smf_tp_variables WHERE type='dl_not_approved'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 219, which took 0.00049901 seconds.

SELECT * FROM smf_tp_blocks WHERE off=0 ORDER BY bar,pos,id ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 250, which took 0.00166011 seconds.

SELECT value, item FROM smf_tp_data WHERE type=0 AND ID_MEMBER=2
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 506, which took 0.000525 seconds.

SELECT type,value, item FROM smf_tp_data WHERE type=2 AND ID_MEMBER=2
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 516, which took 0.00058198 seconds.

SELECT * FROM smf_tp_variables WHERE type='category' ORDER BY value1 ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 614, which took 0.00061893 seconds.

SELECT * FROM smf_tp_variables WHERE type='menubox' ORDER BY value5 ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 633, which took 0.00065207 seconds.

         SELECT variable, value
         FROM smf_settings
   which took 0.00217104 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '164c3f3007b54b388893dfgdfg5abeb4205'
      LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 1993, which took 0.00289202 seconds.

            SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.ID_MEMBER = 2)
            WHERE mem.ID_MEMBER = 2
            LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 390, which took 0.001194 seconds.

SELECT COUNT(*) FROM smf_tp_settings WHERE name='front_type' AND value='single_page'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 1816, which took 0.00045013 seconds.

SELECT art.ID_THEME, sett.value FROM (smf_tp_articles AS art, smf_tp_settings AS sett) WHERE sett.name='featured_article' AND sett.value=art.id
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 1820, which took 0.00045204 seconds.

         SELECT variable, value, ID_MEMBER, ID_THEME
         FROM smf_themes
         WHERE ID_MEMBER IN (-1, 0, 2)
            AND ID_THEME IN (5, 1)
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 1169, which took 0.001194 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 33, which took 0.00101304 seconds.

SELECT name,value FROM smf_tp_settings
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 110, which took 0.00106382 seconds.

SELECT grp.onlineColor FROM (smf_members as m, smf_membergroups as grp)
         WHERE m.ID_GROUP=grp.ID_GROUP
         AND ID_MEMBER=2 LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 150, which took 0.0006299 seconds.

SELECT count(*) FROM smf_tp_variables WHERE type='art_not_approved'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 208, which took 0.00047588 seconds.

SELECT count(*) FROM smf_tp_variables WHERE type='dl_not_approved'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 219, which took 0.00045204 seconds.

SELECT * FROM smf_tp_blocks WHERE off=0 ORDER BY bar,pos,id ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 250, which took 0.00155187 seconds.

SELECT value, item FROM smf_tp_data WHERE type=0 AND ID_MEMBER=2
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 506, which took 0.00045395 seconds.

SELECT type,value, item FROM smf_tp_data WHERE type=2 AND ID_MEMBER=2
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 516, which took 0.00038886 seconds.

SELECT * FROM smf_tp_variables WHERE type='category' ORDER BY value1 ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 614, which took 0.00047016 seconds.

SELECT * FROM smf_tp_variables WHERE type='menubox' ORDER BY value5 ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 633, which took 0.00068712 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php line 2403, which took 0.00061703 seconds.

      SELECT
         lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
         mg.onlineColor, mg.ID_GROUP
      FROM smf_log_online AS lo
         LEFT JOIN smf_members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
         LEFT JOIN smf_membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/SSI.php line 655, which took 0.00112891 seconds.

===================================
AT my first new try it did make also 45 queries to the database.

Now I see the updates to the database are made by the
AdMod !

Maybe they are doing to many updates to the database ?

I have not converted the Admod yet fully to the
Azure Template , I just used the Admod so as it was from
the installation.. Okay, it is missing this way a few features,
so you can not place the ads to all the places you want, but in the
places I needed them it did work...

So is the AdMod the cause of the massive database updates value ?

Many thanks.


hartiberlin

Okay, I am posting now this second queries listing in a new posting,
so it is easier to read.

Here you can see, that SMF_Ads, the AdMod
makes a few updates to the database on a normal
pages, so it seems the real cause of the huge update queries
to the Database is the AdMod , right ?

So should I disable this now ?


Powered by SMF 1.1.1 | SMF Ã,© 2006, Simple Machines LLC
TinyPortal v0.9.7 Ã,© Bloc | Azure design by Bloc
Page created in 0.433 seconds with 35 queries. 

Loading...Templates: 3: index (azure_11final_tp), TPortalBlocks (default), Display (default).
Sub templates: 4: init, main_above, main, main_below.
Language files: 3: index.english (default), Modifications.english (default), TPortal.english (default).
Files included: 13 - 581KB. (show./index.php, ./page.restrictor.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/LoadAds.php, ./Sources/TPortal.php, ./SSI.php, ./Sources/TPmodules.php, ./Sources/Display.php)
Queries used: 36.

         SELECT variable, value
         FROM smf_settings
   which took 0.00277019 seconds.

      SELECT data
      FROM smf_sessions
      WHERE session_id = '164c3f3007bhgfhgfh889387a5ab7874205'
      LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 1993, which took 0.00228596 seconds.

            SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
            FROM smf_members AS mem
               LEFT JOIN smf_attachments AS a ON (a.ID_MEMBER = 2)
            WHERE mem.ID_MEMBER = 2
            LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 390, which took 0.00154686 seconds.

         SELECT
            c.ID_CAT, b.name AS bname, b.description, b.numTopics, b.memberGroups,
            b.ID_PARENT, c.name AS cname, IFNULL(mem.ID_MEMBER, 0) AS ID_MODERATOR,
            mem.realName, b.ID_BOARD, b.childLevel,
            b.ID_THEME, b.override_theme, b.permission_mode, b.countPosts
         FROM (smf_boards AS b, smf_topics AS t)
            LEFT JOIN smf_categories AS c ON (c.ID_CAT = b.ID_CAT)
            LEFT JOIN smf_moderators AS mods ON (mods.ID_BOARD = t.ID_BOARD)
            LEFT JOIN smf_members AS mem ON (mem.ID_MEMBER = mods.ID_MEMBER)
         WHERE b.ID_BOARD = t.ID_BOARD
            AND t.ID_TOPIC = 1761
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 576, which took 0.00169492 seconds.

         SELECT variable, value, ID_MEMBER, ID_THEME
         FROM smf_themes
         WHERE ID_MEMBER IN (-1, 0, 2)
            AND ID_THEME IN (5, 1)
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 1169, which took 0.00126815 seconds.

      SELECT *
      FROM smf_ads
      order by ADS_ID
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 33, which took 0.00118399 seconds.

            DELETE FROM smf_log_online
            WHERE logTime < NOW() - INTERVAL 1200 SECOND
               AND session != '164c3f3007jhkjhkjhka5abeb8768705'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php line 2513, which took 0.00112009 seconds.

         UPDATE smf_log_online
         SET logTime = NOW(), ip = IFNULL(INET_ATON('172.180.81.86'), 0), url = 'a:4:{s:5:\"topic\";i:1761;s:9:\"topicseen\";s:0:\"\";s:5:\"board\";i:49;s:10:\"USER_AGENT\";s:83:\"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ; ; .NET CLR 2.0.46789)\";}'
         WHERE session = '164c3f3007b54kjhkjhkjhk5abeb4205'
         LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php line 2521, which took 0.00064397 seconds.

SELECT name,value FROM smf_tp_settings
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 110, which took 0.00161505 seconds.

SELECT grp.onlineColor FROM (smf_members as m, smf_membergroups as grp)
         WHERE m.ID_GROUP=grp.ID_GROUP
         AND ID_MEMBER=2 LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 150, which took 0.00149679 seconds.

SELECT count(*) FROM smf_tp_variables WHERE type='art_not_approved'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 208, which took 0.00161004 seconds.

SELECT count(*) FROM smf_tp_variables WHERE type='dl_not_approved'
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 219, which took 0.00134587 seconds.

SELECT * FROM smf_tp_blocks WHERE off=0 ORDER BY bar,pos,id ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 250, which took 0.00272107 seconds.

SELECT value, item FROM smf_tp_data WHERE type=0 AND ID_MEMBER=2
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 506, which took 0.00051594 seconds.

SELECT type,value, item FROM smf_tp_data WHERE type=2 AND ID_MEMBER=2
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 516, which took 0.00059795 seconds.

SELECT * FROM smf_tp_variables WHERE type='category' ORDER BY value1 ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 614, which took 0.00094604 seconds.

SELECT * FROM smf_tp_variables WHERE type='menubox' ORDER BY value5 ASC
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/TPortal.php line 633, which took 0.000669 seconds.

         UPDATE smf_topics
         SET numViews = numViews + 1
         WHERE ID_TOPIC = 1761
         LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 145, which took 0.00087905 seconds.

      SELECT
         t.numReplies, t.numViews, t.locked, ms.subject, t.isSticky, t.ID_POLL,
         t.ID_MEMBER_STARTED, t.ID_FIRST_MSG, t.ID_LAST_MSG,
         IFNULL(lt.ID_MSG, -1) + 1 AS new_from
      FROM (smf_topics AS t, smf_messages AS ms)
         LEFT JOIN smf_log_topics AS lt ON (lt.ID_TOPIC = 1761 AND lt.ID_MEMBER = 2)
      WHERE t.ID_TOPIC = 1761
         AND ms.ID_MSG = t.ID_FIRST_MSG
      LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 160, which took 0.00137496 seconds.

            UPDATE smf_log_topics
            SET ID_MSG = 20603
            WHERE ID_MEMBER = 2
               AND ID_TOPIC = 1761
            LIMIT 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 275, which took 0.01567292 seconds.

         SELECT sent, ID_TOPIC
         FROM smf_log_notify
         WHERE (ID_TOPIC = 1761 OR ID_BOARD = 49)
            AND ID_MEMBER = 2
         LIMIT 2
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 292, which took 0.01479506 seconds.

            SELECT COUNT(*)
            FROM smf_topics AS t
               LEFT JOIN smf_log_boards AS lb ON (lb.ID_BOARD = 49 AND lb.ID_MEMBER = 2)
               LEFT JOIN smf_log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = 2)
            WHERE t.ID_BOARD = 49
               AND t.ID_LAST_MSG > IFNULL(lb.ID_MSG, 0)
               AND t.ID_LAST_MSG > IFNULL(lt.ID_MSG, 0)
               AND t.ID_LAST_MSG > 20603
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 328, which took 0.00100303 seconds.

            REPLACE INTO smf_log_boards
               (ID_MSG, ID_MEMBER, ID_BOARD)
            VALUES (20603, 2, 49)
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 348, which took 0.00057101 seconds.

      SELECT ID_MSG, ID_MEMBER
      FROM smf_messages
      WHERE ID_TOPIC = 1761
      ORDER BY ID_MSG DESC
      LIMIT 0, 10
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 682, which took 0.0065279 seconds.

            SELECT
               a.ID_ATTACH, a.ID_MSG, a.filename, IFNULL(a.size, 0) AS filesize, a.downloads,
               a.width, a.height,
               IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.width AS thumb_width, thumb.height AS thumb_height
            FROM smf_attachments AS a
               LEFT JOIN smf_attachments AS thumb ON (thumb.ID_ATTACH = a.ID_THUMB)
            WHERE a.ID_MSG IN (20603,20602,20599,20582,20581,20577,20562,20560,20551,20549)
               AND a.attachmentType = 0
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 711, which took 0.01256299 seconds.

         SELECT
         IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
         mem.signature, mem.personalText, mem.location, mem.gender, mem.avatar, mem.ID_MEMBER, mem.memberName,
         mem.realName, mem.emailAddress, mem.hideEmail, mem.dateRegistered, mem.websiteTitle, mem.websiteUrl,
         mem.birthdate, mem.memberIP, mem.memberIP2, mem.ICQ, mem.AIM, mem.YIM, mem.MSN, mem.posts, mem.lastLogin,
         mem.karmaGood, mem.ID_POST_GROUP, mem.karmaBad, mem.lngfile, mem.ID_GROUP, mem.timeOffset, mem.showOnline,
         mem.buddy_list, mg.onlineColor AS member_group_color, IFNULL(mg.groupName, '') AS member_group,
         pg.onlineColor AS post_group_color, IFNULL(pg.groupName, '') AS post_group, mem.is_activated,
         IF(mem.ID_GROUP = 0 OR mg.stars = '', pg.stars, mg.stars) AS stars,
         mem.usertitle
         FROM smf_members AS mem
         LEFT JOIN smf_log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
         LEFT JOIN smf_attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
         LEFT JOIN smf_membergroups AS pg ON (pg.ID_GROUP = mem.ID_POST_GROUP)
         LEFT JOIN smf_membergroups AS mg ON (mg.ID_GROUP = mem.ID_GROUP)
         WHERE mem.ID_MEMBER IN ('3288', '1384', '3721', '174', '2956', '1809', '3750')
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 888, which took 0.04342723 seconds.

         SELECT *
         FROM smf_themes
         WHERE ID_MEMBER IN (174, 1384, 1809, 2956, 3288, 3721, 3750)
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 905, which took 0.0014329 seconds.

         SELECT
            ID_MSG, icon, subject, posterTime, posterIP, ID_MEMBER, modifiedTime, modifiedName, body,
            smileysEnabled, posterName, posterEmail,
            ID_MSG_MODIFIED < 20600 AS isRead
         FROM smf_messages
         WHERE ID_MSG IN (20603,20602,20599,20582,20581,20577,20562,20560,20551,20549)
         ORDER BY ID_MSG
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Display.php line 739, which took 0.00184894 seconds.

      SELECT c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.childLevel
      FROM smf_boards AS b
         LEFT JOIN smf_categories AS c ON (c.ID_CAT = b.ID_CAT)
      WHERE 1
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Load.php line 1689, which took 0.00166178 seconds.

               SELECT code, filename, description
               FROM smf_smileys
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/Subs.php line 2403, which took 0.0008719 seconds.

      UPDATE smf_ads
         SET hits = hits+1
            WHERE ADS_ID = 11
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 209, which took 0.00075698 seconds.

      UPDATE smf_ads
         SET hits = hits+1
            WHERE ADS_ID = 12
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 209, which took 0.00059009 seconds.

      UPDATE smf_ads
         SET hits = hits+1
            WHERE ADS_ID = 10
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 209, which took 0.00049901 seconds.

      UPDATE smf_ads
         SET hits = hits+1
            WHERE ADS_ID = 10
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 209, which took 0.0006361 seconds.

      UPDATE smf_ads
         SET hits = hits+1
            WHERE ADS_ID = 10
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/Sources/LoadAds.php line 209, which took 0.00056601 seconds.

      SELECT
         lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
         mg.onlineColor, mg.ID_GROUP
      FROM smf_log_online AS lo
         LEFT JOIN smf_members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
         LEFT JOIN smf_membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))
   in /mounted-storage/home4/sub002/sc11940-GNVW/overunity/SSI.php line 655, which took 0.00104594 seconds.

[hide queries]

G6Cad

From what i can see this is some thing you have to get your host to fix for you. This isent some thing TP gives you, so it doesent apply to our support range at all.
Eather you have to contact the Ad mod authour and get the details from the mod and then contact your host and have them to change the settings for you on the server.
But as it is not TP we cant give you more help then we have allready  :-\

hartiberlin

Yes, G6 and all the others,
many thanks for all your help.
It seems it is the reporting of the SMF_AD Mod,
which updates every time the database, when an add is displayed...

And as I had about 5 to 6 ads per page , this then makes many accesses
to the database and updates it.

I will contact the AdMod author now.

Regards, Stefan.

Gargoyle

Dude I run huge amounts of queries on some of my pages and have NEVER been told what you have been told... Here is an example of my query load...

Page created in 0.482 seconds with 153 queries.

I'd say find a new host and leave your forum alone.

Just my 2 cents for what it is worth to you.

nukebiz

I would ensure you don't have "Use a persistent connection" checked in your SMF Server Settings.

I would also generate another "Database Username" for that particular database, and change that value in your SMF Server Settings.

Presumably you already generate a different username for each sql database you operate on your host.

Gourgi

Quote from: hartiberlin on December 22, 2006, 06:08:10 PM
I now had enabled the queries log at the bottomof the forum and this
how can i enable this queries ??
i have queries enabled and now in my forum looks like this
QuotePage created in 0.528 seconds with 26 queries.
but i want to also be able to see the queries to the exact files (eg. Display.template.php ...).
I think there is a tool for this but i searched and i can't find it in SMF :(

G6Cad

There is no such visual option built in SMF or TP
It just show how many queries it did during the page load.

nukebiz

Actually, there is - add this line to Settings.php,
$db_show_debug = true;

G6Cad

QuoteThere is no such visual option built in SMF or TP

nukebiz


G6Cad

Your way work, but it's not BUILT in, the question asked were if it was in some settings with in SMF or TP ;)  , you have to add code your self, and you have to know WHAT code and WHERE.
Thank you for posting it.

Gourgi

Quote from: Resourcez on March 21, 2007, 10:10:09 AM
Actually, there is - add this line to Settings.php,
$db_show_debug = true;
thanks  ;D
this is what i was looking for  :up:

@G6 : i didn't say that the tool i was looking is built in TP or SMf ! I don't know what you understand from my first message but what i was looking for is the code that Resourcez posted.
Thanks both for replying  ;)