BeamMP / BeamMP-Server

Server for the multiplayer mod BeamMP for BeamNG.drive
https://beammp.com
GNU Affero General Public License v3.0
131 stars 53 forks source link

[Bug] Syslog accumulates massive amounts of data when used with systemd on Raspberry Pi OS #94

Closed imcarson closed 2 years ago

imcarson commented 2 years ago

Fill out general information OS: Raspberry Pi OS 11 (32 bit) BeamMP-Server Version: 2.3.3

Describe the bug When the executable is built on the Raspberry Pi 4 and run at startup using systemd, using the command systemctl status BeamMPServer shows tons of lines similar to Mar 14 00:09:17 raspberrypi BeamMP-Server[382]: [48.0K blob data]. There is also tons of data logged to the system's syslog. This data can build up to gigabytes of data over a single day.

To Reproduce

  1. Download and build the server source code on the Raspberry Pi 4 using Raspberry Pi OS 11 (32-bit)
  2. Create BeamMPServer.service in /etc/systemd/system with the following contents:
    
    [Unit]
    Description=Starts up the BeamMP Server

[Service] WorkingDirectory=/home/pi/BeamMP-Server ExecStart=/home/pi/BeamMP-Server/BeamMP-Server

[Install] WantedBy=default.target


3. Run ``systemctl enable BeamMPServer``
4. Run ``systemctl start BeamMPServer``
5. Wait for logs to accumulate
6. Check syslog size in /var/log

**Expected behavior**
``systemctl status BeamMPServer`` should output regular text that is is actually meaningful, and there shouldn't be a huge build up of text in ``syslog``.

**Logs**
Server.log is completely normal and not applicable, but here's the syslog
![image](https://user-images.githubusercontent.com/61283706/158085432-94cddab0-5bb8-4469-86d7-b4186f49a5f0.png)
lionkor commented 2 years ago

This is a bug, but I'm not sure how to tackle this properly. You should probably set stdout to /dev/null, in this case, and use the Server.log file as your source of output, if you need it.

lionkor commented 2 years ago

I can no longer reproduce this on branch rc-v3.1.0 (#83), closing. Please re-open if it still happens, with new info on how to reproduce on v3.1.0.