# Code Update



## Dragoneer (Feb 25, 2006)

We made some tweaks to the code today regarding how the system processes data, and it seems to have helped out quite a bit. The system is still fairly responsive during prime time. It still needs much more refinement. And on that note, we're bringing a new coder aboard, Crypto, a professional in the field, and is nice enough to lend us his time to help us refine the code for clean up and performance. He was recommended by Gushi.

Serverside, we're still having issues with the main box. It does not want to stop crashing, so I am taking the box to my home in the next few days to run some tests on it. The good news: the temp server received a 2GB memory upgrade, which should hold out for quite a while until I can run proper diagnostics (Sandra) on our primary box to troubleshoot its technical flubbergastering.

Version 3.0 of the site is coming along nicely, with a LOT of upgrades and bug fixes. We're continuing to fix bugs when we can, but we're trying to be more thorough with testing now. 3.0 will revamp the upload process ENTIRELY, along with other vital aspects of the site.


----------



## Catamount (Feb 25, 2006)

Yay!    The site does seem quite a bit better for the time being....thanks for the update!


----------



## Dragoneer (Feb 25, 2006)

Catamount said:
			
		

> Yay!    The site does seem quite a bit better for the time being....thanks for the update!


It is faster, much faster... just suffering from a few SQL errors here and there, which will be fixed when the rest of the queries are.


----------



## Silver R. Wolfe (Feb 26, 2006)

Nice to hear everything at least seems going a bit more smoothly.  (Both the state of the site and the plans to fix the other whatchamacallit.)

I'm looking forward to v3.0, though personally I like most of the upload system right now.

Is there a new skin/color scheme underway as well?


----------



## Dragoneer (Feb 26, 2006)

silverwolfe said:
			
		

> Nice to hear everything at least seems going a bit more smoothly.  (Both the state of the site and the plans to fix the other whatchamacallit.)
> 
> I'm looking forward to v3.0, though personally I like most of the upload system right now.
> 
> Is there a new skin/color scheme underway as well?


Yes, there will revised skin in the new site with several color themes.


----------



## uncia2000 (Feb 26, 2006)

Dragoneer said:
			
		

> We made some tweaks to the code today regarding how the system processes data, and it seems to have helped out quite a bit. The system is still fairly responsive during prime time. It still needs much more refinement.


*nod nods*. Hopefully anything systematic can be spotted, soonish.
Was concerned that there may have been other underlying issues beyond just the lack of RAM, etc.

It's good to clear a hurdle, but even better to pre-empt all the others ahead.
*fingers crossed* & thanks 



			
				Dragoneer said:
			
		

> And on that note, we're bringing a new coder aboard, Crypto, a professional in the field, and is nice enough to lend us his time to help us refine the code for clean up and performance. He was recommended by Gushi.


Greetings to Crypto & good luck to him for working out the system from scratch! Know that's always an interesting experience to hit afresh...



			
				Dragoneer said:
			
		

> Serverside, we're still having issues with the main box. It does not want to stop crashing, so I am taking the box to my home in the next few days to run some tests on it. The good news: the temp server received a 2GB memory upgrade, which should hold out for quite a while until I can run proper diagnostics (Sandra) on our primary box to troubleshoot its technical flubbergastering.


Will Sandra be adequate to point out any issues, hardware or software?
(Or d'you know anyone with a lot of spare parts to swap-in/out until it works AOK!).

Very frustrating trying to pin-point such issues (especially if it is something like an infrequent PSU glitch).



			
				Dragoneer said:
			
		

> Version 3.0 of the site is coming along nicely, with a LOT of upgrades and bug fixes. We're continuing to fix bugs when we can, but we're trying to be more thorough with testing now. 3.0 will revamp the upload process ENTIRELY, along with other vital aspects of the site.




Has been pretty rough recently but thanks for hanging on in there, yet again; and to everyone else, too.
Very much looking forward to long-term stability and consistently decent response times.

I can live without the active user count for the time-being


----------



## Dragoneer (Feb 26, 2006)

uncia2000 said:
			
		

> Very frustrating trying to pin-point such issues (especially if it is something like an infrequent PSU glitch).


Yeah, I know. =/ Luckily, I just happen to have a spare 600 Watt Enermax Noisetaker PSU sitting here...

Don't ask why. =P

My current plan is to test everything as is, see which tests (may) cause the system to crash, then start replacing components one by one by one. We'll see. I want this up and finished ASAP.


----------



## *morningstar (Feb 26, 2006)

Thanks a bunch for the update :3 The site is running so much better and I'm really glad to know that there's another coder on board helping. Good luck with fixing the server.


----------



## Kougar (Feb 27, 2006)

LOTS of good to hear information here, we all appreciate the update! 

And thanks for stepping up to the plate Crytpo... best of luck to ya  :wink:  


Idle question, is the main system crashing on it's own at idle, or under load, or just when ya'll attempt to get it to host FA? Before the OS is even loaded? Whatever the root source is, hopefully is a simple enough thing to fix once found  :|


----------



## Dragoneer (Feb 27, 2006)

Kougar said:
			
		

> LOTS of good to hear information here, we all appreciate the update!
> 
> And thanks for stepping up to the plate Crytpo... best of luck to ya  :wink:
> 
> ...


It's due to the problems in the Queries. It's a coding issue that only crops up once so many users are on. The problem A) results in crashing/SQL errors and B) site slowdowns.

This is our highest priority to fix.

Granted, it takes a few days to get a coder up to speed and comfortable with how the code works.


----------



## uncia2000 (Feb 27, 2006)

Dragoneer said:
			
		

> Yeah, I know. =/ Luckily, I just happen to have a spare 600 Watt Enermax Noisetaker PSU sitting here...
> 
> Don't ask why. =P


OK, I'll just imagine then! 



			
				Dragoneer said:
			
		

> My current plan is to test everything as is, see which tests (may) cause the system to crash, then start replacing components one by one by one. We'll see. I want this up and finished ASAP.


Sounds like a good plan.
Hopefully it will crash consistently when you put it under stress using a particular test rather than continuing that frustrating behavior of running OK for several hours then freezing up for "no apparent reason".

Will you be able to interchange the CPUs, too; or be able to run it on just one?


----------



## TORA (Feb 28, 2006)

If I can look at 26 pages of 64 artworks in one hour with only one SQL error, that means that progress has been made. (True story... happened this morning!) ROWR.


----------



## Kougar (Feb 28, 2006)

Is good to hear you've managed to narrow things down to that point! 

As for taking time to understand the code before ya start mucking around in it, take all the time ya need... Always better to know how things work before ya make changes, instead of creating four problems by having fixed the one.


----------



## Dragoneer (Mar 1, 2006)

Kougar said:
			
		

> Is good to hear you've managed to narrow things down to that point!
> 
> As for taking time to understand the code before ya start mucking around in it, take all the time ya need... Always better to know how things work before ya make changes, instead of creating four problems by having fixed the one.


We're planning to rewriting the entire codebase underneath the hood in the next two weeks or two. This should yield MASSIVE performance boosts.

<3 Crypto.


----------



## NeoWarriorCat (Mar 1, 2006)

Oh yes, it needs it.

Keep getting MySQL errored into oblivion. Kinda impossible for me to really use the site right now


----------



## Torin_Darkflight (Mar 1, 2006)

Yeah, it seems the entire site fell down and went boom again. Been getting nothing but SQL errors all night.


----------



## NeoWarriorCat (Mar 1, 2006)

Oh it works off and on.... short spurts of working-ness with about 15 or so minutes inbetween.


----------



## uncia2000 (Mar 1, 2006)

Kougar said:
			
		

> As for taking time to understand the code before ya start mucking around in it, take all the time ya need... Always better to know how things work before ya make changes, instead of creating four problems by having fixed the one.


The key trick is not to screw up the data in the process.
It's easy to back-out software changes, but forced data rollbacks are never appreciated by users!
Thankfully (or should that be hopefully?) our data structures aren't that complex.

=
Yeah, quite a few "batches" of SQL errors just now, it seems...
At least the error messages are much better than before.

```
Database error in www.furaffinity.net: Invalid SQL: DELETE FROM df_useronline WHERE online<'1141202163'
mysql error: Lock wait timeout exceeded; try restarting transaction
mysql error number: 1205
User: uncia2000
Date: 01.03.2006 @ 04:16
Script: /browse/
Referer:
MySql ERROR! Please check the logs for information on the error(s)
```
Fixable...


----------



## NeoWarriorCat (Mar 1, 2006)

If now is *much* better.... something tells me I'm glad I missed what came before


----------



## Guppy (Mar 3, 2006)

*The error*

It's likely a poorly constructed SQL that does a cross table reference, where the query ends up trying to return the entire results of one table for every result on the first table   I've seen that happen, yeah it would drag the SQL service to its knees.

example:

select * from pictures,users where pictures.id in (234,235,236,237);

That would return 4 copies of the user database (16,000 or so records) whereas

select * from pictures,users where pictures.id in (234,235,236,237) and pictures.user_id=users.id;

would return the 4 pictures along with the user data associated with them.

Yeah, a bug like that where SQL statements are constructed across many lines of code is hard to find, and really usually found early on 

Good luck with that guys.


----------

