Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 03-14-2009, 06:29 PM   #1
teh ghey
Guest
 
Posts: n/a
Can site slowness cause a database to be corrupted?

My database has crashed every week and it seems to happen at peek times, when my site is super slow from too much traffic.

After my database crashes it's totally gone. members cant log in, messages are all gone, their guestbooks and friends lists all gone, etc.

I'm trying to figure out WHY my database crashes ever week. I was wondering if its possible that my database can crash because theres too many people on and I hit my bandwith limit
.
is that lilkely, or unlikely?
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-14-2009, 06:32 PM   #2
WarChild
Let slip the dogs of war.
 
WarChild's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: Bermuda
Posts: 17,263
That seems unlikely. I am guessing you are talking SQL to your database, so either it receives the SQL and executes or it does not.

You haven't really given enough information to really diagnose an issue. If I had to guess, I'd say it's something bad in the software its self. Maybe some sort of table lock timing out but even then corruption seems unlikely.

Is the database on a seperate disk than the operating system? Is it possible that disk controller is gone or going and writing bad data?
__________________
.
WarChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-14-2009, 06:44 PM   #3
teh ghey
Guest
 
Posts: n/a
It's software that I bought to run a dating website. Its really weird, I'll have 100 users on the dating site, and my site becomes slow as fuck. Like it takes 10 seconds for a page to load. I have my own server 3 MBPS Unmetered, 2.66 GHZ Core2, 2x500 GB Drives, 2 GB RAM
and all my other sites with databases run fine, but this fucking site is slow.

My admin says the database is creating temp files on the hard drive, and my queries are using a rand() function which is horrible.

I dont know what to do. I'll do anything to get it running fast and smooth again.
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-14-2009, 06:48 PM   #4
WarChild
Let slip the dogs of war.
 
WarChild's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: Bermuda
Posts: 17,263
Is it custom software? Frankly it sounds like it was poorly written with no database optimizations considered or used.
__________________
.
WarChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-14-2009, 07:20 PM   #5
teh ghey
Guest
 
Posts: n/a
Quote:
Originally Posted by WarChild View Post
Is it custom software? Frankly it sounds like it was poorly written with no database optimizations considered or used.
No its off the shelf. What can i do? Is it a good idea to hire a database God to come in and re-work the database?
I dont know what else to do, ive put in $4k into the site with custom work so I dont want to start over, especially since i have a good amount of members now
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-14-2009, 09:24 PM   #6
WarChild
Let slip the dogs of war.
 
WarChild's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: Bermuda
Posts: 17,263
Quote:
Originally Posted by teh ghey View Post
No its off the shelf. What can i do? Is it a good idea to hire a database God to come in and re-work the database?
I dont know what else to do, ive put in $4k into the site with custom work so I dont want to start over, especially since i have a good amount of members now
Unless you have the source code, you won't be able to move things like randomizations off of the database and in to the code its self.

Have you tried to contact the company that wrote the software? That'd be the first step. They might be aware of any issues or have a solve or be able to point you in the right direction.
__________________
.
WarChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-14-2009, 09:31 PM   #7
teh ghey
Guest
 
Posts: n/a
Quote:
Originally Posted by WarChild View Post
Unless you have the source code, you won't be able to move things like randomizations off of the database and in to the code its self.

Have you tried to contact the company that wrote the software? That'd be the first step. They might be aware of any issues or have a solve or be able to point you in the right direction.
yeah, theyre not very good at figuring out what the problem is and they dont seem concerned with figuring it out.
its a cheap software and I put few K into it to add more and more features. the site is excellent now, jsut perfect. but its this database problem.
once I can get this fixed im good again
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2009, 01:14 AM   #8
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Database corruption can be caused by a number of circumstances, such as commands triggering specific bugs (make sure you're using the latest stable release) or a big lack of memory.

A simple - but temporary - solution would be to go with a dedicated database server. Lack of load would speed things up and might well prevent the glitches which cause the corruption from occurring.

But apart from that, it sounds like the script also has some major design flaws. Going by the very limited amount of information you're giving, it seems that for searches, the script uses "order by rand()", then creates temporary files with the search results to make sure separate result pages use the same data set and thus don't contain overlapping results. The temporary files actually aren't that bad, but the order by rand() is.

There are a number of ways to fix that. For example, a simple but hackish switch to non-random results (possibly using a somewhat stable environment variable like day of the week to determine sort order, thus making sure that the same search will yield different results on different days). Alternatively, a few lines of code can emulate order by rand() fairly easily while requiring less from your server (depending of things like number of results needed and deleted rows). Etc. There are lots of possibilities.

For other functions (random featured member, random people you might also like, etc) pseudo-random results work just as well, and require only a fraction of the resources.

If you have the source code of the script, a decent programmer should be able to optimize it while leaving all or at least most functionality intact. It will cost a bit, but it's pretty much necessary.

However, regardless, get more ram, and consider getting a dedicated database server. Dynamic sites are rather heavy on servers, especially when they have lots of features.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2009, 01:21 AM   #9
Libertine
sex dwarf
 
Libertine's Avatar
 
Join Date: May 2002
Posts: 17,860
Quote:
Originally Posted by teh ghey View Post
My database has crashed every week and it seems to happen at peek times, when my site is super slow from too much traffic.

After my database crashes it's totally gone. members cant log in, messages are all gone, their guestbooks and friends lists all gone, etc.

I'm trying to figure out WHY my database crashes ever week. I was wondering if its possible that my database can crash because theres too many people on and I hit my bandwith limit
.
is that lilkely, or unlikely?
Oh, wait, I didn't read well... haven't slept in a day or two and all, sorry.

The combination of your low amount of ram, relatively high number of visitors and badly written script causes crashes, the crashes cause corruption. So, the advice is pretty much the same as in my previous post. Either more ram or a dedicated database server, and some optimization of your script.
__________________
/(bb|[^b]{2})/
Libertine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 03-15-2009, 01:29 AM   #10
Deej
I make pixels work
 
Deej's Avatar
 
Industry Role:
Join Date: Jun 2005
Location: I live here...
Posts: 24,386
I dunno, but a corrupted database can cause site slowness
__________________

Deej's Designs n' What Not
Hit me up for Design, CSS & Photo Retouching


Icq#30096880
Deej is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.