Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Info > CSDb moving to a new server
2012-06-24 11:31
Perff
Administrator

Posts: 1665
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. :)

2012-06-24 11:41
iAN CooG

Registered: May 2002
Posts: 3136
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 =)
2012-06-24 13:51
E$G

Registered: Dec 2007
Posts: 789
thanX for precious work. Wondering how many GB is the backup of the whole site?
2012-06-24 15:04
Perff
Administrator

Posts: 1665
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.. :)
2012-06-24 18:59
Stone

Registered: Oct 2006
Posts: 168
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.
2012-06-24 19:09
aNdy

Registered: Jan 2004
Posts: 41
Thanks for the efforts.

May be time for me to make a donation again...
2012-06-24 21:32
Conrad

Registered: Nov 2006
Posts: 833
"7.7GB for uploaded files releases. (over 100'000 files!)"

\o/ Epic
2012-06-25 06:57
Radiant

Registered: Sep 2004
Posts: 639
Perff, you are a true hero of the scene. Thank you!
2012-06-25 12:07
Perff
Administrator

Posts: 1665
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. :)
2012-06-25 13:56
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
2012-06-25 20:46
Perff
Administrator

Posts: 1665
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.
2012-06-25 21:43
CreaMD

Registered: Dec 2001
Posts: 3035
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.
2012-06-27 19:43
Perff
Administrator

Posts: 1665
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. :)
2012-06-28 05:05
soci

Registered: Sep 2003
Posts: 474
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 ;(
2012-06-28 10:05
Perff
Administrator

Posts: 1665
Hm. I have something running https on the new server, so it's possible. :)

Anyway - here we go...
2012-06-28 10:19
Cruzer

Registered: Dec 2001
Posts: 1048
Good luck! Last person to post on the old server wins! :)
2012-06-28 10:22
Perff
Administrator

Posts: 1665
old server:

uptime
12:21PM up 1574 days, 11:18, 1 user, load averages: 2.31, 2.44, 2.20

:)
2012-06-28 10:25
Didi

Registered: Nov 2011
Posts: 479
Good luck!
Good idea with the shutdown counter. ;)
2012-06-28 10:28
hedning

Registered: Mar 2009
Posts: 4601
Break a leg everyone! Yeeehaaah!
2012-06-28 11:00
Perff
Administrator

Posts: 1665
Back online on the new server! :)
2012-06-28 11:03
Conrad

Registered: Nov 2006
Posts: 833
<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.
2012-06-28 11:39
Skate

Registered: Jul 2003
Posts: 491
Same problem exists for the Advanced search, too. Maybe you can just disable PHP warnings if there are no side effects.
2012-06-28 11:41
Didi

Registered: Nov 2011
Posts: 479
Feels like flying! Thumbs up! I know moving to a new server with version changes is no simple task.
2012-06-28 11:47
Perff
Administrator

Posts: 1665
<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. :)
2012-06-28 11:55
Cruzer

Registered: Dec 2001
Posts: 1048
Whoa, the speed!! Is the new server using speedcode?
2012-06-28 12:04
Perplex

Registered: Feb 2009
Posts: 254
I think it's all precalculated. But you knew I was going to say that.
2012-06-28 12:09
Wisdom

Registered: Dec 2001
Posts: 90
That's because it's now ZeroPage Optimized (TM). (patent pending)
2012-06-28 12:32
Perff
Administrator

Posts: 1665
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. :)
2012-06-28 12:47
Didi

Registered: Nov 2011
Posts: 479
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. ;)
2012-06-28 14:15
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
2012-06-28 16:34
MagerValp

Registered: Dec 2001
Posts: 1056
Quoting Skate
Maybe you can just disable PHP warnings if there are no side effects.

I just died a little reading that.
2012-06-28 17:06
Nafcom

Registered: Apr 2002
Posts: 588
Quote: Quoting Skate
Maybe 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
2012-06-28 17:13
chatGPZ

Registered: Dec 2001
Posts: 11127
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 =)
2012-06-28 17:39
Perff
Administrator

Posts: 1665
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. :)
2012-06-28 20:02
bepp

Registered: Jun 2010
Posts: 264
Good work Perff! We really enjoy the BLAZING speed of the new server and updated codez! Yummy!
2012-06-28 21:11
hedning

Registered: Mar 2009
Posts: 4601
When trying to upload files:

"Problems with file server. Probably down. :( (Errorcode: 4)
Please try to upload again later."
2012-06-28 21:16
Perff
Administrator

Posts: 1665
Should work again now. :)

Thanks for reporting.
2012-06-28 22:10
bepp

Registered: Jun 2010
Posts: 264
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 =)
2012-06-29 04:32
ChristopherJam

Registered: Aug 2004
Posts: 1380
Nice work, Perff!

Also, *rofl* @ Perplex :)
2012-06-29 12:13
Skate

Registered: Jul 2003
Posts: 491
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..
2012-06-29 12:23
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.
2012-06-29 12:29
Skate

Registered: Jul 2003
Posts: 491
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.
2012-06-29 12:36
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.
2012-06-29 12:44
d0c

Registered: Apr 2006
Posts: 186
wow!!! new csdb is speedy, i like it :D
2012-06-29 18:06
chatGPZ

Registered: Dec 2001
Posts: 11127
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" =)
2012-06-29 18:07
Queen bittin
Account closed

Registered: Jun 2011
Posts: 119
Quote: wow!!! new csdb is speedy, i like it :D

same :) indeedy <3
2012-06-29 20:18
JackAsser

Registered: Jun 2002
Posts: 1989
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.
2012-06-29 20:22
chatGPZ

Registered: Dec 2001
Posts: 11127
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
2012-06-29 20:43
JackAsser

Registered: Jun 2002
Posts: 1989
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. ;)
2012-06-29 20:47
chatGPZ

Registered: Dec 2001
Posts: 11127
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 =)
2012-06-29 21:09
Skate

Registered: Jul 2003
Posts: 491
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.
2012-06-30 14:30
bugjam

Registered: Apr 2003
Posts: 2492
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
2012-06-30 15:43
Perff
Administrator

Posts: 1665
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 )
2012-06-30 18:17
cadaver

Registered: Feb 2002
Posts: 1153
Great work! The site certainly feels speedier now.
2012-07-03 18:59
Frantic

Registered: Mar 2003
Posts: 1627
Edit: Disregard this post. :)
2013-12-06 00:27
theWizard
Account closed

Registered: Jul 2007
Posts: 109
Quote: Edit: Disregard this post. :)

ok mate lol.. will do.
2013-12-06 00:28
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
CA$H/TRiAD
Guests online: 133
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Nostalgia  (9.3)
2 Oxyron  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (9.9)
2 Facet  (9.6)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.121 sec.