Host elected problem

Hi,
I have a server and i have no problem on my consol, but the problem is when people come on my server my consol say the id 10 is now the new host… but when this happend the player 10 see every people disconnect and he is now alone on the server. But the others peoples are always together until a now host elect arrived.
We you are elected you are alone on the server, you can’t see anyone on the server player list your are alone but on the consol its written 5 players and we can’t speack each other by the tchat in game…

Because of that we can’t play together more than 5 min…

Your server is instancing. It’s splitting in two or more instances. This is caused by something in your scripts. Can your server box handle the load? How many SQL queries are you executing? Queries should be kept to a minimum.

I will check, could it be my server speck ?

I got 2 Go or ram
2 Vcore
100 Mbps up/down

could it be my ram ?

It doesn’t take much to run a FiveM server, but if your running a bunch of scripts that are executing queries your server will flip out. Let’s say you have 10 queries that load at spawn for each player. That’s 100 queries for 10 players all at once. Your specs look fine but 2gb of RAM is kinda low. I run my server off of an i5 and 8gb of RAM with an SSD. I don’t have any real problems, but I keep my queries to a minimum.

i see i see but the problem is in can’t disabled more queries than now … so you think i need more Ram i could try to upgrade my server and pay for a vps with 4Gb of ram

It may help it may not. All the resources that were recently released, most are SQL based. Which is one of the reasons [es] has so many problems. And is one of the reasons the old [es] has been replaced and now uses a different DB. [Es] already queries every 60 seconds to save money by default. I still use SQL and the old [es] but like I said I keep my queries to a minimum. I plan on switching to couch DB, just not quite yet. Some queries don’t even make sense, why save player location every 60 seconds? Just save POS at disconnect and load at spawn.

I remove evry thing in my ctimp-server and i will put one after one to see witch one make the “error” happend

The other problem is some queries can be spammed by the player. Like the jobs. Once you open the job menu and press enter over and over on a single job. It spams SQL queries. The script has no check in place. I spammed 30 times on purpose and crashed my friends server as a stress test. So in his case 30 at once crashes the server. He has to reduce the amount of players or SQL queries.

or use a white list and be sure peoples on the server wont do shit…
i see banking use a lot of queries to just update the money he check evry minute

I changed the timeout to 300000, every 5 mins. Whitelist, sure. Or the script could be made properly and have checks in place. Let’s say the player can only pick a job every 30 mins. Hard to script, you bet. But IMO it’s required.

Is it in server.lua ?

In [es] Server/player/login. You’ll see the save money function.

ok thanks you :slight_smile: yeah i see i got some frame time warning: serveur frame took 28 msec

What is your CPU priority? High or real time priority gives better performance. However if your paying for your server it costs more. I just open task manager and set it to high, as that PC is used for nothing else but the server.

its was in normal i try to put on hight

@HST… Sorry, But none of this makes sense… I do not use ES and it happened to me the first boot of the server… No extras at all… Plain default server files…

@DarkWolf2985 Sure It can happen. But the entire reason for the change of [es] to couch DB was because of MySQL issues. Just because your having these issues doesn’t mean it’s from SQL. But if over half your script are doing queries that is a problem. And it’s not a coincidence that upon spamming queries servers crash or instance.

but ok with all that but why the server make a host vote ? could we disable it and just make the server lag and not make players leave…

That’s a question for the creators of FiveM. They have that system in place for a reason.

This may shed some light.