I have been having serious problems working with and viewing my main Gallery 2 database. It sometimes takes 5 seconds to bring up the database front page, and other times it takes more than 90 seconds.
What happens in the worst case is that a file directory is moved,
whether that directory contains 5 files or 500 files, and the database
isn't updated with the new location. If I move the directory back
manually, the database almost always catches up and completes the move.
Other times, the database won't even let me start the move process, as
the screen that shows the album tree is replaced by a blank white
screen. If I can get past this point, I may still get a blank white
screen but the files and the database album are moved almost immediately.
On a couple of occasions, I saw albums with around 500 files moved
almost instantly, but not a minute later I couldn't access the database
again at all. Other move or delete operations with 5 or 10 files would
fail miserably and repeatedly. Even changing the text descriptions of
albums was failing. When I do the same file operations over FTP or the ISP's online File Manager, even at the same time that the database is claiming a read/write failure, the change is instantaneous. I don't understand how everything can be so fast and reliable one day for a few hours and then seconds later it feels like the server is running on a 14.4 kbps modem. Wait half an hour, and operations start zooming really fast, and then screech to a halt again inexplicably.
Two days ago, there were some slowness problems, but not like today. I've been effectively locked out of my Gallery database for more than 36 hours, and I'm hitting Error 503:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
The ISP says that it's working fine, that the size of the database may be causing some slowness, but that if I want more performance I need to upgrade from a shared server to a dedicated server. Does it really take that many resources to run Gallery 2?
I've made a listing of the errors that I've been getting on this page:
ERROR_STORAGE_FAILURE indicates an incident where there was no response
from the server during a file or directory move, or a path rename operation.
ERROR_LOCK_TIMEOUT is indicates an incident where a file or directory was being moved, and had been moved successfully, but still resulted in this error message.
ERROR_BAD_PATH indicates an attempt to move an album directory that had
already been moved, but the database had not been updated with the new
path after more than five minutes.
I tried changing from File Locking to Database Locking, but that made the problem worse. What can I do to fix this slowness problem?
Gallery version 2.3
PHP version 5.2.8 cgi-fcgi
Database mysql 5.0.91-log
Operating system Linux p3nlh068.shr.prod.phx3.secureserver.net 2.6.18-164.15.1.el5PAE #1 SMP Wed Mar 17 12:14:29 EDT 2010 i686