Community discussions

MikroTik App
 
marathoneer
just joined
Topic Author
Posts: 14
Joined: Fri Feb 03, 2012 6:20 pm

Mikrotik keeps connection "established", stacking too many

Mon Apr 04, 2016 12:30 pm

Hello!

I have RB751G-2HnD, running 6.33.5. Internet link via PPPoE.

I also have Ubuntu Server behind, NATed by Mikrotik to internet. There is job running on server, it tries to connect to my clients on specific TCP port, to check if it's open to communicate, written @ php, ordinary fsockopen/fclose . Runs daily, about 1-2K ips.

The problem I'm running in to - mikrotik tracks connection established forever, despite the fact Ubuntu server dropped it, other side aswell. Leaving me with thousands of connection esteblished, which at some point overload the router (usually close to 6-7K)

Image

Full size link

===============
root@10:/home/hostmit# netstat -ant|wc -l
171
===============

Netstat shows only 171 connections, while mikrotik ~2K+. Any ideas how do solve it? Why mikrotik keeps track it as established? Thanks.
 
User avatar
BartoszP
Forum Guru
Forum Guru
Posts: 3109
Joined: Mon Jun 16, 2014 1:13 pm
Location: Poland

Re: Mikrotik keeps connection "established", stacking too many

Mon Apr 04, 2016 1:20 pm

Push "Tracking" button and lower maximum TCP session time-out ...
Seems that Ubuntu servers does not closes connections properly but leaves/orphanes them "open/active" and router waits till each one times-out ... 24h is default value
 
marathoneer
just joined
Topic Author
Posts: 14
Joined: Fri Feb 03, 2012 6:20 pm

Re: Mikrotik keeps connection "established", stacking too many

Fri Apr 08, 2016 12:16 pm

Thanks for reply. Tested - problem is Ubuntu Server related. Launched the same application at FreeBSD, it doesnt spawn tons of connections, not a single one appears on tracking tab with timeout over 5 mins.

I've limited tracking time, yet with at least 20 threads running, my internet connection goes unstable.