Traccar server on AWS t2.micro instance

saurako5 years ago

Has anyone had success in running the traccar server on the AWS t2.micro instance?
We've been trying to run it for almost a week now, and are running to a strangely high latency / weird payload delivery order issues and are thoroughly confused with what's going on. We did find https://www.traccar.org/forums/topic/how-to-install-traccar-server-on-aws-amazon-step-by-step-tutorial/ , which unfortunately doesn't talk anything about the type of instance used. We have our own build of the server, and have successfully run it on our own machines for sometime now. But our migration to AWS have brought these new issues up.
Any help with this will be greatly appreciated!

Anton Tananaev5 years ago

There shouldn't be any issues. How many devices do you have, how big is the DB and what DB are you using?

saurako5 years ago

We have about 8 active devices. We're using MySql on AWS's RDS. The DB isn't too big, ~800M in size, tho most of it is a few months of data from only a couple devices.

Anton Tananaev5 years ago

You shouldn't have any issues if you only have Traccar and database installed there and no other services.

saurako5 years ago

Okay, that's good to know. It's probably an instance config issue then. I'll keep you posted as I investigate and find more. Thanks Anton!

saurako5 years ago

So I was diagnosing things using netstat and looks like the recv-q on at least one port we have enabled (5089, for Aquila), gets backed up quite a bit. It is at 7K right now, and I can't really tell why, but this is the first indication that the process is having trouble going thru the messages quickly. Do you have any suggestions on where I could look for possible problems? I can give you more details about the configuration of the instance if you need that.
Again, this doesn't seem to happen on our own servers and the only difference there seems like the difference in RAM. Could be swap space too - looks like EC2 t2 instances come default with NO swap space!

Anton Tananaev5 years ago

Trying disabling any external services that you use. For example, reverse geocoding.

saurako5 years ago

So turns out we didn't have socket connection timeouts - [protocol].timeout in our config. Adding that made things better and helped us recognize a device that had gone rogue; we're still trying to figure out exactly what is wrong with it, but disabling that device seems to have fixed the issue for now.