| |
Perff Administrator
Posts: 1676 |
CSDb moving to a new server
Hi everyone.
I've been planing to move CSDb to a new server for some time now, as the old one was getting old. :)
As the new server is running new versions of php etc. I need to recode bits and pieces, which is why it has been going a bit slow.
Then today I got a mail from my hosting company, telling me that the old server is flashing red. They say it's a pending hardware failure. :(
Hopefully nothing will happen before I get CSDb moved, but I will for sure not have the time to test everything as good as I wanted, so be prepared for misc. stuff acting wierd when I get it moved.
The worst case is that the old server suddenly crash, and data will be lost.
I'll make sure to take backups often, and transfer them to the new server, to make the loss of data minimal in this case, but I though you should know this is a possibility.
Anyway, hope to see you soon on the new server. :)
|
|
| |
iAN CooG
Registered: May 2002 Posts: 3186 |
ok, go for it. let us know if you will shut down csdb for a while to not loose anything added in the last minutes =) |
| |
E$G
Registered: Dec 2007 Posts: 839 |
thanX for precious work. Wondering how many GB is the backup of the whole site? |
| |
Perff Administrator
Posts: 1676 |
Quote:Wondering how many GB is the backup of the whole site?
Aprox values: (uncompressed)
1.6GB for code and screenshots etc.(http-scope files)
1.5GB for database dump in SQL format.
7.7GB for uploaded files releases. (over 100'000 files!)
and growing.. :)
|
| |
Stone
Registered: Oct 2006 Posts: 172 |
Good luck and thanks for the awesome work you're doing! Without it, I don't think all of us old-timers would have come back to the scene. |
| |
aNdy
Registered: Jan 2004 Posts: 41 |
Thanks for the efforts.
May be time for me to make a donation again... |
| |
Conrad
Registered: Nov 2006 Posts: 847 |
"7.7GB for uploaded files releases. (over 100'000 files!)"
\o/ Epic |
| |
Radiant
Registered: Sep 2004 Posts: 639 |
Perff, you are a true hero of the scene. Thank you! |
| |
Perff Administrator
Posts: 1676 |
Thanks for the comments. :)
Anyway, here is an update.
I have now got a copy of CSDb running on the new server, but with many errors yet.
I do the "fixes" on the old server, and then sync them over to the new one frequently.
This way you can help me make sure that my changes still work, so if you find that something is not working as it used to or looks strange, let me know here asap, so I can fix it. :)
(actually I already found a bug while writing this. ;) )
Thanks. :) |
| |
BuZz Account closed
Registered: Jun 2002 Posts: 20 |
Do you know what the "pending failure is"? if it is SMART monitoring, you could use smartctl and take look at the log.
if this is running on mysql (or similar), a good way to avoid dataloss could be set up a slave database elsewhere. in terms of files, you could ionice rsync every 15 mins or so, or keep the files elsewhere temporarily on an nfsmount.
if you need any additional copies of the data, id be happy to give you some space on my exotica server to use.
[edit] didnt see the last reply before posting this. glad everything is progressing well |
| |
Perff Administrator
Posts: 1676 |
Update..
I have made some major changes around in the code, to prepare it for the new server, so please be on the lookout for bugs and strange things, and report it to me. :)
Thanks. |
| |
CreaMD
Registered: Dec 2001 Posts: 3048 |
Good move. Time pressure always help to get things done. Glitches doesn't matter that much in the light of having faster response times nad such stuff tha comes with more powerful server. ;-) Good luck with the move. |
| |
Perff Administrator
Posts: 1676 |
Update:
It's now been several hours since I completed altering the code to make it run on the new server.
I have testet it on both the new and old server (with a little help) and found a few minor things, and fixed them.
There are some scheduled jobs that run at night, which I would also like to test before making the final move, but if they run ok tonight, I'll move CSDb tomorrow. :)
I'll put up a warning which will be impossible to overlook when I make the countdown, so you won't risk that the old server will shut down while you are adding some info. :)
Again - if you find anything, please report. :) |
| |
soci
Registered: Sep 2003 Posts: 479 |
Good. You haven't forgot to setup a https server on this new location, right? Seriously, it's 2012 and still plaintext logins on csdb ;(
|
| |
Perff Administrator
Posts: 1676 |
Hm. I have something running https on the new server, so it's possible. :)
Anyway - here we go... |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Good luck! Last person to post on the old server wins! :) |
| |
Perff Administrator
Posts: 1676 |
old server:
uptime
12:21PM up 1574 days, 11:18, 1 user, load averages: 2.31, 2.44, 2.20
:)
|
| |
Didi
Registered: Nov 2011 Posts: 486 |
Good luck!
Good idea with the shutdown counter. ;) |
| |
hedning
Registered: Mar 2009 Posts: 4720 |
Break a leg everyone! Yeeehaaah! |
| |
Perff Administrator
Posts: 1676 |
Back online on the new server! :) |
| |
Conrad
Registered: Nov 2006 Posts: 847 |
<Post edited by moderator on 28/6-2012 18:20>
Feels a lot faster now! Excellent!
First bug noticed:
When I click on a "function" or "country" from a scener profile, I get a error message on the top:
"Warning: Illegal string offset 'category' in <path-and- file-removed>.php on line 6"
but still get the content as normal. |
| |
Skate
Registered: Jul 2003 Posts: 494 |
Same problem exists for the Advanced search, too. Maybe you can just disable PHP warnings if there are no side effects. |
| |
Didi
Registered: Nov 2011 Posts: 486 |
Feels like flying! Thumbs up! I know moving to a new server with version changes is no simple task. |
| |
Perff Administrator
Posts: 1676 |
<Post edited by Perff on 28/6-2012 13:56>
I'm looking into the problem. :)
Problem fixed.
Also found a potential other problem at the same time and fixed that too. :) |
| |
Cruzer
Registered: Dec 2001 Posts: 1048 |
Whoa, the speed!! Is the new server using speedcode? |
| |
Perplex
Registered: Feb 2009 Posts: 255 |
I think it's all precalculated. But you knew I was going to say that. |
| |
Wisdom
Registered: Dec 2001 Posts: 90 |
That's because it's now ZeroPage Optimized (TM). (patent pending) |
| |
Perff Administrator
Posts: 1676 |
Hehe.
Well, it's faster than I could hope for, so I'm happy. :)
Here is a little hardware info:
Old server:
- CPU: XEON 2.6Ghz
- RAM: 1GB
New server:
- CPU: Dual-Core AMD Opteron(tm) Processor 1210 1.8GHZ
- RAM: 8GB
Also newer OS, PHP & SQL, and a lot more diskspace.
But I guess the RAM counts for a big part of it. :)
|
| |
Didi
Registered: Nov 2011 Posts: 486 |
RAM is a big issue for databases.
Also CPUs developed a lot over the years. Old P4 Netburst architecture, which I guess the old Xeon single core was based on, had about the power of a todays Netbook Atom CPU. ;) |
| |
Fierman
Registered: Feb 2002 Posts: 85 |
Quote: RAM is a big issue for databases.
Also CPUs developed a lot over the years. Old P4 Netburst architecture, which I guess the old Xeon single core was based on, had about the power of a todays Netbook Atom CPU. ;)
bs |
| |
MagerValp
Registered: Dec 2001 Posts: 1074 |
Quoting SkateMaybe you can just disable PHP warnings if there are no side effects.
I just died a little reading that. |
| |
Nafcom
Registered: Apr 2002 Posts: 588 |
Quote: Quoting SkateMaybe you can just disable PHP warnings if there are no side effects.
I just died a little reading that.
So how are people supposed to know there's an error and report that then? Some errors could also be browser related? I am not sure Klaus has all the browsers on this planet to test |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
its not even about testing. php is shitty enough as is, you really dont have to make your code even shittier by ignoring warnings and errors =) |
| |
Perff Administrator
Posts: 1676 |
php is shitty..??
Never thought of it that way, but yes, php allows you to do a lot of things in an unsecure way to make it easy, and this was one of the problems with this move.
They are starting to clear out some of the worst of those "features", which i gladly used back in the days when coding CSDb in the first place. :)
Roughly estimated, I had to fix 1500 lines of code all around. :) |
| |
bepp
Registered: Jun 2010 Posts: 265 |
Good work Perff! We really enjoy the BLAZING speed of the new server and updated codez! Yummy! |
| |
hedning
Registered: Mar 2009 Posts: 4720 |
When trying to upload files:
"Problems with file server. Probably down. :( (Errorcode: 4)
Please try to upload again later." |
| |
Perff Administrator
Posts: 1676 |
Should work again now. :)
Thanks for reporting. |
| |
bepp
Registered: Jun 2010 Posts: 265 |
Still can't reference SIDs from latest HVSC. I know it has prolly nothing to do with the server switching. But it would be nice to have it fixed =) |
| |
ChristopherJam
Registered: Aug 2004 Posts: 1408 |
Nice work, Perff!
Also, *rofl* @ Perplex :) |
| |
Skate
Registered: Jul 2003 Posts: 494 |
Quote: So how are people supposed to know there's an error and report that then? Some errors could also be browser related? I am not sure Klaus has all the browsers on this planet to test
listen mr.smartass, i'm using PHP from its first release and there is a simple rule for PHP.
1) Enable all messages (even notices) at your development platform.
2) Disable all messages except errors (sometimes even errors) on production machine. why? to avoid hacks! hackers like to use these messages and there are some tricky ways to learn some hidden information generating warning/error messages (like learning the database user name and bruteforce the password etc.).
That warning was about using objects as array keys. Possible workaround is converting them to string or using a string function which accepts objects like trim(). That's not a big deal. PHP already does the convertion automatically but generates a warning just like many compilers does the same for type convertions (possible loss of data etc.).
Please note that PHP wasn't generating this warning up to a certain version. Since I haven't seen any part of CSDB source code, i thought arrays could have been used with object keys at many places. So, if fixing this problem everywhere was hard, just disabling the warnings wouldn't be a problem since production server configuration meant to be like this.
edit:
example url for you
http://aymanh.com/checklist-for-securing-php-configuration#erro.. |
| |
Nafcom
Registered: Apr 2002 Posts: 588 |
I don't think insulting people is really smart either. Oh and it was MagerValp who first wrote a comment in this way, not me (I just agreed on him). I am pretty sure Perff knows what's the best to do. |
| |
Skate
Registered: Jul 2003 Posts: 494 |
Quote: I don't think insulting people is really smart either. Oh and it was MagerValp who first wrote a comment in this way, not me (I just agreed on him). I am pretty sure Perff knows what's the best to do.
@Nafcom: It was a mistake, i was trying to quote MagerValp, your message is not insulting. MagerValp is the smartass one.
I adore Perff's dedication to this site but i don't see any reason to believe my PHP knowledge is worse than him. I've developed hundereds of PHP projects over the years. Some of them are being used by worldwide banks including Citibank etc. I don't need to prove myself to anyone but please stop making comments without enough knowledge. |
| |
Nafcom
Registered: Apr 2002 Posts: 588 |
Okay then apology accepted. I guess that is why CSDb v.2 is planned since ages to get the whole site redone in a better way and more secure way. |
| |
d0c
Registered: Apr 2006 Posts: 186 |
wow!!! new csdb is speedy, i like it :D |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
Quote:php is shitty..??
from all languages i have worked with, it must be the one that is the least well specified and least well designed one - by far. you know you are in trouble when even the original coder says things like "it was never ment for huge projects" =) |
| |
Queen bittin Account closed
Registered: Jun 2011 Posts: 119 |
Quote: wow!!! new csdb is speedy, i like it :D
same :) indeedy <3 |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Quote:php is shitty..??
from all languages i have worked with, it must be the one that is the least well specified and least well designed one - by far. you know you are in trouble when even the original coder says things like "it was never ment for huge projects" =)
Bash my friend! Bash is faaaaaar worse. Since php5, i think php is exceptionally good. Problem is that you are not forced into a structure, like j2ee f.e., which will allow you to create a mess unless you have teh sk1llz. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
Quote:which will allow you to create a mess unless you have teh sk1llz
thats the main problem of PHP imho - its said to be an "easy" language for people who are still learning. And then the code written by said people goes into production =P |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Main problem with most languages. When youre a newbie to the framework or language the first attempts are usually bad and should never reach production. The real world is ofcourse rather the opposite, most of my code included. ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11352 |
Quote:Main problem with most languages.
its much more of a problem with some than with others imho - when the entry barrier is relatively low, AND the language is said to be "easy", AND the language is full of design flaws, chances are a whole lot more crap is the result than it is with other languages where these things are not as bad by far =) |
| |
Skate
Registered: Jul 2003 Posts: 494 |
remember MySQL 3.23 era? all MSSQL, Oracle and other "more complete" SQL server users were complaining about missing Stored Procedures, Triggers etc. now MySQL has them all but they still don't like MySQL because they think current version is not much different than 3.23. Same thing applies for PHP. PHP 3 was almost like Ansi C. PHP 4 had more OOP features and better libraries but still there were many missing things. Even PHP 5.0 wasn't as good as the current PHP version. If i recall correctly namespaces are added around 5.3 version.
My point is if you had a glance to PHP 5-10 years ago and you still think it's the same language you've seen, you are terribly wrong. But if you follow the new features and it's still not good enough for you because of some base features like not being a strongly typed but a loosely typed language etc. i've nothing to say. Many programmers doesn't like these kind of languages. But if you didn't follow PHP for a while, just have another glance.
back to topic, new server feels better. thank you again Perff for all your efforts and clean transfer. |
| |
bugjam
Registered: Apr 2003 Posts: 2581 |
Great work for sure!
One small bug I found: the download here Charts June now brings a 404:file not found - looking at the address bar, it seems that one code is interpreted as a backslash and thus fucks up the dl link.
Cheers,
Bugjam
|
| |
Perff Administrator
Posts: 1676 |
Hm. Can't explain why it would work on the old server and not the new one, but fixed it. :)
(Hope I didn't break anything else with that fix!? ;-P )
|
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
Great work! The site certainly feels speedier now. |
| |
Frantic
Registered: Mar 2003 Posts: 1646 |
Edit: Disregard this post. :) |
| |
theWizard Account closed
Registered: Jul 2007 Posts: 109 |
Quote: Edit: Disregard this post. :)
ok mate lol.. will do. |
| |
theWizard Account closed
Registered: Jul 2007 Posts: 109 |
Quote: Great work! The site certainly feels speedier now.
is it? i wouldnt know sky broadband reminds me of me nanny riding a snail , its slow as fuck lol |