Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent Lagging Issues with Self-Hosted Music Bot Instance #345

Closed
HarakuneSan opened this issue Jun 24, 2023 · 1 comment
Closed

Persistent Lagging Issues with Self-Hosted Music Bot Instance #345

HarakuneSan opened this issue Jun 24, 2023 · 1 comment

Comments

@HarakuneSan
Copy link

I am encountering persistent lagging issues with my self-hosted instance of the music bot. The lag occurs for approximately 10 seconds at the beginning, intermittently in the middle, and sometimes not at all during playback. Despite my attempts to resolve the problem by adjusting the aiode.preferences.native_audio_buffer value in the application.properties file to both 0 and 3000, the lagging problem persists.

Steps to Reproduce:

Start the self-hosted music bot instance.
Initiate music playback.
Observe the lagging issue occurring for around 10 seconds at the start, sporadically in the middle, or occasionally not at all.

Expected Behavior:
The music bot should play audio seamlessly without any noticeable lagging interruptions.

Actual Behavior:
The music bot consistently experiences lagging issues, causing disruptions and delays during playback.

Additional Information:

I am running the music bot on Ubuntu 22.
The version of the music bot I am using is the master branch from the repository.
Python is not required for the music bot.
The application.properties file contains the aiode.preferences.native_audio_buffer setting that I have adjusted.
My internet connection is stable with sufficient bandwidth.
The lagging issue occurs on different tracks and does not follow a specific pattern.
My hosting environment meets the recommended specifications for running the music bot.
Other functionalities of the music bot, such as commands and bot responses, appear to be working correctly without any lag.

Possible Solution:
I have attempted to address the lagging problem by modifying the aiode.preferences.native_audio_buffer value in the application.properties file, but the issue persists. It would be beneficial to explore alternative configurations or investigate any underlying causes that could be contributing to the persistent lagging issues.

Environment:

Operating System: Ubuntu 22
Music bot version: Master branch
Relevant configuration file: application.properties
@robinfriedli
Copy link
Owner

What's your CPU usage like?

Assuming you're only streaming to one or a few guilds and you didn't mess with the memory settings I highly doubt the heap is large enough or there's enough memory pressure to cause GC spikes large enough to cause noticeable stutters, so changing the native buffer doesn't really have any effect and setting it to extreme values like 3000 just causes additional problems. It's probably either CPU usage or package loss, or other network issues between you and the source. Might be worth trying to enable high package priority on Discord.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants