SQL/PHP has gone crazy. ERROR_PERMISSION_DENIED

accphotography

Joined: 2008-05-14
Posts: 66
Posted: Thu, 2013-06-27 12:59

According to my host, Gallery has gone nuts running a crazy number of SQL/PHP queries/processes. I'm trying to figure out what might have caused this sudden problem but I'm really bad at reading debug files.

System information:

Gallery URL = http://www.accphotography.com/gallery/main.php
Gallery version = 2.3.1 core 1.3.0.1
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.3.25 cgi-fcgi
Webserver = Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database = mysqli 5.5.31-cll, lock.system=flock
Toolkits = ImageMagick
Acceleration = none/900, none/900
Operating system = Linux helix.hostmds.com 2.6.32-379.22.1.lve1.2.17.1.el5h.i686 #1 SMP Tue May 14 18:15:56 EEST 2013 i686
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Rows in GalleryAccessMap table = 67
Rows in GalleryAccessSubscriberMap table = 21258
Rows in GalleryUser table = 69
Rows in GalleryItem table = 21253
Rows in GalleryAlbumItem table = 575
Rows in GalleryCacheMap table = 0

I am attaching by debug file.

Does anyone see anything obvious there? Maybe a problem with Checkout? Maybe the theme (Matrix)? I'm seeing some repetitions there but I'm not sure what is normal or how to read what those repetitions are. The last time I had something similar happen it was the Favorites plugin and when I uninstalled it everything was fine again. I don't know which thing might have gone nuts this time though as someone here was the one that told me it was the Favorites.

Any help at all ASAP would be GREATLY appreciated (and yes, I AM planning to upgrade Gallery soon).

Thanks!!!

AttachmentSize
Debug.txt41.42 KB
 
accphotography

Joined: 2008-05-14
Posts: 66
Posted: Thu, 2013-06-27 22:11

I just found this in the event log:

Date Type Location Client Summary
Thu 27 Jun 2013 06:07:44 PM EDT Gallery Error Link 157.55.32.82 ERROR_PERMISSION_DENIED
Thu 27 Jun 2013 06:07:44 PM EDT Gallery Error Link 157.55.32.82 ERROR_PERMISSION_DENIED
Thu 27 Jun 2013 06:07:44 PM EDT Gallery Error Link 157.55.32.82 ERROR_PERMISSION_DENIED
Thu 27 Jun 2013 06:07:44 PM EDT Gallery Error Link 157.55.34.171 ERROR_PERMISSION_DENIED
Thu 27 Jun 2013 06:07:44 PM EDT Gallery Error Link 157.55.33.251 ERROR_PERMISSION_DENIED
Thu 27 Jun 2013 06:07:44 PM EDT Gallery Error Link 157.55.32.82 ERROR_PERMISSION_DENIED
Thu 27 Jun 2013 06:07:44 PM EDT Gallery Error Link 157.55.32.82 ERROR_PERMISSION_DENIED
Thu 27 Jun 2013 06:07:43 PM EDT Gallery Error Link 157.55.32.82 ERROR_PERMISSION_DENIED

Over and over and over and over again. Some of the links seem to do with favorites (which I uninstalled) and some seem to do with the theme (which I tried changing). Any ideas at all? My host is about to fire me!! :( :(

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-06-28 01:45

is 157.55.32.82 an IP associated w/ your server?

there is no error in your debug log

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
accphotography

Joined: 2008-05-14
Posts: 66
Posted: Fri, 2013-06-28 02:45

No it is not. This is what I found on it:

"Location: Beverly Hills, United States - 157.55.32.82 is a static assigned BroadbandIP address allocated to Microsoft Bingbot."

FWIW My host is Canadian and I'm in Kentucky.

 
accphotography

Joined: 2008-05-14
Posts: 66
Posted: Fri, 2013-06-28 02:48

I am now seeing another IP as well "66.249.75.206" and this one is listed as "Googlebot".

Why are they doing this to me!?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-06-28 02:49

so "Gallery Error Link" is an actual link. are they all to the same item? and does this item actually exist?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
accphotography

Joined: 2008-05-14
Posts: 66
Posted: Fri, 2013-06-28 03:01

No they're to TONS of different items and yes, they all exist (well, the photos anyway, I'm not sure about the way the links are written). Here are a couple of examples:

http://www.accphotography.com/gallery/main.php?g2_view=search.SearchScan&g2_form[useDefaultSettings]=1&g2_return=%2Fgallery%2Fphotos%2Fstal02%2FKOneKingHead.jpg.html%3Fg2_GALLERYSID%3D652cd78a893a242bb1d1c49b8e241421&g2_GALLERYSID=652cd78a893a242bb1d1

http://www.accphotography.com/gallery/main.php?g2_view=slideshow.SlideshowMediaRss&g2_itemId=31889

http://www.accphotography.com/gallery/main.php?g2_view=search.SearchScan&g2_form[useDefaultSettings]=1&g2_return=%2Fgallery%2Fphotos%2Fnv%2Fnv_authentic_shot%2FIMG_7644.jpg.html%3Fg2_GALLERYSID%3D497bce15d0a15d169304cd507c3c29e9&g2_GALLERYSID=497bce15

http://www.accphotography.com/gallery/main.php?g2_view=slideshow.SlideshowMediaRss&g2_itemId=25058

http://www.accphotography.com/gallery/main.php?g2_view=search.SearchScan&g2_form[useDefaultSettings]=1&g2_return=%2Fgallery%2Fphotos%2Fshadwell07%2FSultanaEddingtonFilly9.jpg.html%3Fg2_GALLERYSID%3Ddc638f0df3781bda4a1d1693b0c3c07e&g2_GALLERYSID=dc638f

I know what some of those photos are and can navigate to them myself. (I have it currently in maintenance mode so my customers know it's down so you may not be able to see anything. Let me know if it would help you if I turned that off for a bit.)

On the ones of that that are the "slideshow" thing, this is the error the page gives me when I go to the link:

"
Security Violation

The action you attempted is not permitted.

Back to the Gallery
Error Detail -
Error (ERROR_PERMISSION_DENIED)

in modules/core/classes/GalleryView.class at line 168 (GalleryCoreApi::error)
in main.php at line 325 (GalleryView::loadView)
in main.php at line 104
in main.php at line 88

System Information
Gallery version 2.3.1
PHP version 5.3.25 cgi-fcgi
Webserver Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
Database mysqli 5.5.31-cll
Toolkits ImageMagick
Operating system Linux helix.hostmds.com 2.6.32-379.22.1.lve1.2.17.1.el5h.i686 #1 SMP Tue May 14 18:15:56 EEST 2013 i686
Browser Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
"

On the ones that are existing photos this is what I see:

"
Security Violation

The action you attempted is not permitted.

Back to the Gallery
"

This is the item of one of the photos that it is giving an error on:
http://www.accphotography.com/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=28093&g2_serialNumber=3

There and working.

I have URL Rewrite turned off right now so things look a little funny. (Don't suppose that could cause some of this? I had disable it because I disabled EVERY non essential plugin trying to get these repeating processes to stop (which they have) but at the time I hadn't noticed the Event Log lines so I'm not sure.)

Thank you so much for the help!! My host thanks you too!!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2013-06-28 03:02

that is normal site crawling. the issue may be that somewhere you or another site is referencing an image that no longer exists or they anon user has no access to.
again "Gallery Error Link" is an actual link does it point to a current item?

-s
________________________________
All New jQuery Minislideshow for G2/G3

 
accphotography

Joined: 2008-05-14
Posts: 66
Posted: Fri, 2013-06-28 03:05

Now it's showing my own IP address here in KY as having errors even though I haven't seen any. I'm seeing a LOT of these for various files:

"http://www.accphotography.com/gallery/themes/matrix/local/images/nav_next.gif"

Audrey C. Crosby Photography's Gallery Home Page

Error: 404 File Not Found
http://www.accphotography.com/gallery/themes/matrix/local/images/nav_next.gif
This page is valid XHTML 1.0 Powered by Gallery v2.3.1 G2.3: Skidoo Donate to the Gallery project

That's odd (to my simple brain anyhow).

 
accphotography

Joined: 2008-05-14
Posts: 66
Posted: Fri, 2013-06-28 03:10

Oh weird. For some reason it is looking for some of the Matrix files in "http://www.accphotography.com/gallery/themes/matrix/matrix/images/..." as opposed to "http://www.accphotography.com/gallery/themes/matrix/images/...". The "matrix" is doubled. When I navigate to it with just the single word it goes right to it.

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Fri, 2013-06-28 06:23

The pesky bots are unknowingly running searches on your site which means, given how many links they crawl per second, a hell of a lot of DB queries hitting your server.

I bar them from such using a robots.txt.

User-Agent: *
Disallow: *g2_view=search.SeachScan*
Disallow: *g2_view=rss.SimpleRender*
Disallow: *g2_view=ecard.SendEcard*
Disallow: *g2_view=core.UserAdmin*
Disallow: *g2_view=comment*
Disallow: /gallery/popular*
Disallow: *slideshow.html*
Disallow: *g2_controller*
Disallow: /gallery/lib/*
Disallow: *admin*
Disallow: *key/*

Basically tells any search bot that respects robots.txt, such and bingBot and googleBot, not to crawl or index any links that match the patterns given.

Takes a day or two for the robots.txt file to be updated by googleBot but if you log into their webmasters site, you can manually get it done.

--
dakanji.com