PDA

View Full Version : Server memory blow please help


swish
09-04-2006, 03:20 AM
No idea what happand, but now when I start up the server every zone takes like 350mb and kills all the memory.
Useally, all the zones together took like 200mb I have no idea whats going on.
I havent changed anything heh.

Please help! =P

Thanks,
Swish.

swish
09-04-2006, 04:16 AM
This is my swap memory, I dont know what it is but I think that whats causing it:
Swap: 0k total, 0k used, 0k free, 96516k cached

What can I do ?
Please help me! =P

Thanks.

eq4me
09-04-2006, 10:43 AM
I wager the guess that you are using linux? (Edit: Dumb me. Of course it is or why should it be under "Support: Linux Servers" :)
Are you certain that you didnt change a thing. Maybe updating the OS?
What distro/kernel do you use?
Having no swap at all is not very advisable but it probably wont help much if you are out of RAM because your server might be slowing to a crawl when swapping to harddrive.
Please have a look in /etc/fstab and see what partition is the swap partition. In case the server is running on one disk or has an hardware raid you should make sure that that partition has the correct system ID (82) and is set up as a swap partition (mkswap /dev/<whatever>) If that is the case do a swapon -a, maybe you have a wrong fstab entry. If you have a software raid the (raided)swap partition should have a system id of 'FD' or it wont work propperly.
See if any shared memory segments are still in use ... as much as I hate the idea(typical Windows procedure, if it wont work reboot and try again) you should think about rebooting the server. Depending on the kernel you use there are some strange bugs. Eg. after 400+ days of uptime under older 2.4.ish kernels ect.

swish
09-04-2006, 10:52 AM
Well, now I know that its a DB problem.
Though, I cant figure out how to source an sql file.
Where do I put the sql file and than source through mysql ?

Thanks,
Swish.

Angelox
09-04-2006, 11:07 AM
Well, now I know that its a DB problem.
Though, I cant figure out how to source an sql file.
Where do I put the sql file and than source through mysql ?

Thanks,
Swish.

If you have a custom database or already started adding npc's ect - It may be a fatal idea, to source stuff into your DB from me or anyone else. Here is the way to do it;
Read up here and down load his (zephyr325) tool;
http://www.eqemulator.net/forums/showthread.php?t=21441
download my full PEQ back up , then restore to a NEW schema, with a new name.
Now you have your DB and mine, so you can merge my stuff into yours.

eq4me
09-04-2006, 11:23 AM
Why dont you revert to the last working DB backup and try to import the latest char data from the broken DB?

swish
09-04-2006, 12:49 PM
I cant seem to be able to log on my DB.
It says that the access is denied and I need to check the DB values..
Iam deperate heh.

eq4me
09-04-2006, 06:57 PM
Without the exact error message we cant make a prediction. Google is your friend here.
Reading the Forums on your website it seems the trouble started after you rebootet your server? When was the last time you restarted the mysql daemon? Maybe something screwed up yor config since the last restart. Or did you transfer part of your installation to a new disk? See if the mysql file ownerships and flags are still correct.

In case you dont do this yet: I urge you to do at least a daily backup of all relevant data(Database dump and /etc/) to some save place. Maybe to another disk, an USB stick or better to an remote computer.

I am toying with doing an basic howto on EQEmu specific Linux server setup and adminstration but thanks to my current workload that might wait till the next cycle of the multiverse... *sigh*

swish
09-05-2006, 12:09 AM
Iam trying to figure out how to source in Linux.
I am entering MySql but when I try to source the sql file it says that it cant find it or something. Which is obvious heh.
I was just wondering if ya know where does mysql reads sql files in Linux.
I know that its mysql/bin on windows.

Thanks,
Swish.

swish
09-05-2006, 12:25 AM
Oh btw. Now I understand something.
I copied the database and I am only left with copies.
It gives me error 1017. Googled it and it says that it useally happans by copying the DB and needs to change premissions.
Saw it in HERE (http://www.mysqlfreaks.com/errors/27.php).

How do I change it ?

Thanks,
Swish.

Angelox
09-05-2006, 12:29 AM
Iam trying to figure out how to source in Linux.
I am entering MySql but when I try to source the sql file it says that it cant find it or something. Which is obvious heh.
I was just wondering if ya know where does mysql reads sql files in Linux.
I know that its mysql/bin on windows.

Thanks,
Swish.

There shouldn't be a problem with that - anything you install in Linux becomes an "integrated" part of the system- so you should be able to type out the command (in a shell), direct it to the sql file, and it should take it.
It should be "mysql" and the rest of the options you want. Remember, Linux is caps sensitive, if you put in a letter that doesn't match exactly the file's it will not work. Also make sure you have no hidden spaces.

Angelox
09-05-2006, 12:34 AM
Oh btw. Now I understand something.
I copied the database and I am only left with copies.
It gives me error 1017. Googled it and it says that it useally happans by copying the DB and needs to change premissions.
Saw it in HERE (http://www.mysqlfreaks.com/errors/27.php).

How do I change it ?

Thanks,
Swish.

You need to go to mysql.com and download some tools;
http://dev.mysql.com/downloads/
get the mysql-administrator for now, so you won't confuse your self.

eq4me
09-05-2006, 01:10 AM
Did you do a copy via SQL or on the Linux commandline with 'cp' or some archiving tool like 'tar' ?
Check that the files you copied still owned by the user mysql.

Provided the user and group is named mysql you can change that back with:

chown mysql:mysql <filename>
or
chown -R mysql:mysql <directory> # this recursively changes all ownerships from the top directory down.

Be extremely cautionous when doing this and triple check that you are in the right directory.

Changing the file permissions can be done with 'chmod' please read the manpage carefully and dont do a chmod 777 or 666 it is as popular as dumb. As above be extremely cautionous that you dont accidently change the wrong files. If you accidently do an chmod -R 666 on system libraries or binaries youre screwed.

chmod 750 would make an directory read/writable by the owner, readable by the group and forbidden for anyone else

In short 777 would make an directory read/writable and an binary executable and read/writable by !anyone!. chmod 666 would be preventing anyone from entering a directory otherwise it does the same as 777.

If you do copy data around I would recommend that you use cp at least with the -iax options. If you do use tar be sure to add the -p option to preserve file ownerships and attributes.

swish
09-05-2006, 01:11 AM
I am not too good with Linux heh. And I am useing a dedicated host so I dont really know how to download things to there.

Anyway, I use Webmin and I see few options to change premissions and stuff in there.
Can anybody explain to me which premission I need to change and to what plz ?

Thanks,
Swish.

swish
09-05-2006, 01:15 AM
Not sure I understood that eq4me heh =P

Maybe you guys can ask me stuff and tell me what to do ?

I'v never messed with mysql too much lol. No idea how to do these stuff heh.

swish
09-05-2006, 01:28 AM
OK, its not premission. Its not the problem. I get access to the DB.
I just cant get rid of the error 1017.
Any clues how to fix it ?

Thanks,
Swish.

swish
09-05-2006, 01:47 AM
I got it all working. I can access the DB now.

But I still having the memory blow after I used Angelox's sqls without being careful (no hard feelings).

Angelox: any way you can help me remove the lines I'v added by your sqls please ?

Thx.

Angelox
09-05-2006, 02:08 AM
I got it all working. I can access the DB now.

But I still having the memory blow after I used Angelox's sqls without being careful (no hard feelings).

Angelox: any way you can help me remove the lines I'v added by your sqls please ?

Thx.

This is why you have to always back up first - post me a back up of your database somewhere and I will download/look/test it.
MAKE SURE you compress it first with RARE or what ever, before you post it

eq4me
09-05-2006, 02:18 AM
Yesterday: A DBA's backup song
(To be sung to the tune of Yesterday)


Yesterday,
All those backups seemed a waste of pay
Now my database has gone away
Oh I believe in yesterday

Suddenly,
There's not half the files there used to be
And there's a deadline
hanging over me
The system crashed so suddenly.

I pushed something wrong
What it was I could not say
Now my data's gone
and I long for yesterday-ay-ay-ay.

Yesterday,
The need for back-ups seemed so far away.
Thought all my data was here to stay,
Now I believe in yesterday.



Sorry, couldn't resist. :D

Seriously. Get a good beginners book about Linux adminstration and try to be more paranoid when it comes to important data.

Angelox
09-05-2006, 02:28 AM
Yesterday: A DBA's backup song
(To be sung to the tune of Yesterday)


Yesterday,
All those backups seemed a waste of pay
Now my database has gone away
Oh I believe in yesterday

Suddenly,
There's not half the files there used to be
And there's a deadline
hanging over me
The system crashed so suddenly.

I pushed something wrong
What it was I could not say
Now my data's gone
and I long for yesterday-ay-ay-ay.

Yesterday,
The need for back-ups seemed so far away.
Thought all my data was here to stay,
Now I believe in yesterday.



Sorry, couldn't resist. :D

Seriously. Get a good beginners book about Linux adminstration and try to be more paranoid when it comes to important data.


Man, I really feel bad about this, I might be able to fix his database - But I don't know how it could have gotten damaged if these sqls worked for everyone else.
It could have been just a freak thing where the database got corrupted during the update process or, it could be the extra data needs more memory? his machine doesn't have much memory -anyways, If I can get my hands on it, I might be able to salvage it.

swish
09-05-2006, 02:39 AM
Cant really download it its on my host and wont let me download it heh.

Maybe I can PM you the password ? Or maybe give you access to the DB ?

Swish.

eq4me
09-05-2006, 02:43 AM
Dont feel bad Angelox. As far as I am reading it he is back to his original problem. That was before he inserted your SQLs(?). So it isnt your fault.
I am in the businness for over 10 years and at some point I stopped to feel sorry for people who regard backups as unneccessary.

Its all about not making the same mistake twice.
What I would do: Get a fresh PEQ database and switch the Server temorarily to this DB. Does the EQEmu Server still use massive ammounts of RAM?

swish
09-05-2006, 02:51 AM
Lol bro, I said no hard feelings =P

I dont blame anyone but myself heh. But it was caused because of inserting these sqls. I should have backed it up heh.

I just need to know how to erase these things.

Thanks,
Swish.

Angelox
09-05-2006, 03:21 AM
Lol bro, I said no hard feelings =P

I dont blame anyone but myself heh. But it was caused because of inserting these sqls. I should have backed it up heh.

I just need to know how to erase these things.

Thanks,
Swish.

Like I said, make a back up of your database, compress it with something (zip, rar, etc) then post it and give me the link so I can download / install here - I'll try and find and fix the problem for you.
I really don't think these sql's did the damage -
What most I worry about is, if someone has a database with work already done, then installing mine could interfere or not all go in due to duplicate numbers (not crash the whole database).
Reality of all this is, if you want to depart from the original 7.0 installer for windows, and start doing your own stuff - then you need to learn stuff mysql, perl, and if Linux; basic Unix first.
I know enough Unix/Linux to have a Linux EqEmu server - but chose a windows server instead, because I knew I had to learn Mysql, Perl, and would be working out Linux issues also, not to mention most the support, tools are in windows.

Angelox
09-05-2006, 03:31 AM
Cant really download it its on my host and wont let me download it heh.

Maybe I can PM you the password ? Or maybe give you access to the DB ?

Swish.
I don't get it - where is your host? at your house? anyways if you want PM me the PW and I'll try back it up from here.
I don't really like to use PM a lot because all this that happens teaches others what to do (or what not to do). It's better to keep things open for the rest here.
But PM me the password -
Tell me what system you have running and where (if it is close to you like at home, or on a far off server). It sounds like your host controls you , instead of you control your host.

swish
09-05-2006, 04:01 AM
Alright heh, its working now =D
I deleted all the loot drops and tables that i'v inserted from the sql from the DB.
The problem was the loots somehow heh.

Anyway, sorry for the mess and everything.
Thanks for supporting guys =D

I think your doing great job Angelox heh. Its all good now heh.
I just think you should make some warning in there =P

Anyways, cheers guys.

Thanks again,
Swish.

Angelox
09-05-2006, 04:16 AM
Alright heh, its working now =D
I deleted all the loot drops and tables that i'v inserted from the sql from the DB.
The problem was the loots somehow heh.

Anyway, sorry for the mess and everything.
Thanks for supporting guys =D

I think your doing great job Angelox heh. Its all good now heh.
I just think you should make some warning in there =P

Anyways, cheers guys.

Thanks again,
Swish.

You really should start saving your work, as i can assure this will not be the first time you loose what you are doing (there are more reasons to loose your data).
That's what they have back-ups :)
I haven't lost anything I wanted to keep in almost 20 years now.

eq4me
09-06-2006, 11:00 AM
I am experimenting with an EQEmu Linux installation right now and it comes to my mind that maybe you didnt had enough shared memory.
Look in your logs or start a zone server and see if you find the following lines:


failed to get 0-length shared mem: Function not implemented
shmat failed! Invalid argument


To check your current shared memory limit setting do this

cat /proc/sys/kernel/shmmax

The Number you got is the size in BYTES

You can change that on the fly with this command. As an example let us set the size to 128 MB

echo 134217700 > /proc/sys/kernel/shmmax

To see an effect you should restart the EQEmu server after that.
After a reboot of the server the setting is gone. If you want to make it permanent you have to edit /etc/sysctl.conf (at least for Debian, Redhat/Fedora and derviates)
See if you already have an 'kernel.shmmax' entry you can modify. Otherwise add the line:


kernel.shmmax = 134217700

Angelox
09-06-2006, 11:24 AM
Yesterday: A DBA's backup song
(To be sung to the tune of Yesterday)


Yesterday,
All those backups seemed a waste of pay
Now my database has gone away
Oh I believe in yesterday

Suddenly,
There's not half the files there used to be
And there's a deadline
hanging over me
The system crashed so suddenly.

I pushed something wrong
What it was I could not say
Now my data's gone
and I long for yesterday-ay-ay-ay.

Yesterday,
The need for back-ups seemed so far away.
Thought all my data was here to stay,
Now I believe in yesterday.



Sorry, couldn't resist. :D

Seriously. Get a good beginners book about Linux adminstration and try to be more paranoid when it comes to important data.

This song is hilarious - I've been passing it around to some friends :)

eq4me
09-06-2006, 11:32 AM
This song is hilarious - I've been passing it around to some friends :)

There are more. :D

http://paul.merton.ox.ac.uk/computing/beatles.html

John Adams
09-09-2006, 11:31 AM
Angelox, one more thing regarding the memory usage and your database - I just looked (curious) as I have been running your complete DB since your Harbinger updates. 7 of my 10 dynamic zones are running at 600k RAM or so. Only 3 are above 6mb, and none are over 100mb (I would have noticed that, actually).

So I am not sure why mine is different. I do have crashing zone issues, but that's caused by my crazily over-twinked monk friend trying to tear down my server daily. :)



Edit: Uh, nevermind this retarded post. I am a Windows user, not Linux. That's sorta different, eh?

Angelox
09-09-2006, 12:21 PM
Angelox, one more thing regarding the memory usage and your database - I just looked (curious) as I have been running your complete DB since your Harbinger updates. 7 of my 10 dynamic zones are running at 600k RAM or so. Only 3 are above 6mb, and none are over 100mb (I would have noticed that, actually).

So I am not sure why mine is different. I do have crashing zone issues, but that's caused by my crazily over-twinked monk friend trying to tear down my server daily. :)

Edit: Uh, nevermind this retarded post. I am a Windows user, not Linux. That's sorta different, eh?

Did you try my new database? that issue with memory is solved, but you have to download the latest one. Be sure to read the instructions too.

John Adams
09-09-2006, 12:28 PM
Did you try my new database? that issue with memory is solved, but you have to download the latest one. Be sure to read the instructions too.

I'll d/l your latest and load it up before playing with Zeph's tool. (wait, that sounded wrong...)

btw, I had no issue with your previous db that I could tell. Lucky me. :)