rustdesk / rustdesk-server

RustDesk Server Program
https://rustdesk.com/server
GNU Affero General Public License v3.0
5.96k stars 1.22k forks source link

hbbr using unexpected amount of memory and error out after a day in self-hosted setup #438

Open linhz0hz opened 3 days ago

linhz0hz commented 3 days ago

Describe the bug When I use the self hosted server, it works for a day but the server would consistently fail after some time (1-2 days). When looking into it I found the following.

Jun 28 20:34:19 ip-172-31-0-49 hbbr[422]: memory allocation of 488135971 bytes failed Jun 28 20:34:19 ip-172-31-0-49 systemd[1]: rustdesk-hbbr.service: Main process exited, code=killed, status=6/ABRT Jun 28 20:34:19 ip-172-31-0-49 systemd[1]: rustdesk-hbbr.service: Failed with result 'signal'. Jun 28 20:34:19 ip-172-31-0-49 systemd[1]: rustdesk-hbbr.service: Consumed 8.722s CPU time.

The server works after a restart.

Describe the environment Installed on AWS EC2 instantce. Since rustdesk is quite lightweight, I used t3.nano instance with only 0.5GB of memory allocated. During normal operation this seems to be perfectly sufficient, but occationally I get the above error message, it seems hbbr is asking for a lot of memory sometimes.

Is this expected behabior? Also this is quite similar to issue #96 which was not fully explained.