Jump to content

Server consuming a lot of memory


igeoorge

Recommended Posts

igeoorge

Hi,

 
Has anyone had problems with excessive use of memory?
 
I have server with 32gb of memory. The emby server consumes everything in less than 1 hour.
Link to comment
Share on other sites

Happy2Play

@Luke 

 

What would cause the "Busy: database is locked" error 3 time during startup?  Is it still Multiple server running?

2019-10-12 00:15:50.030 Error MediaSourceManager: Error getting media sources
	*** Error Report ***
	Version: 4.2.1.0
	Command line: C:\Users\StarOne\AppData\Roaming\Emby-Server\system\EmbyServer.dll
	Operating system: Microsoft Windows NT 6.2.9200.0
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///C:/Users/StarOne/AppData/Roaming/Emby-Server/system/System.Private.CoreLib.dll
	Processor count: 16
	Program data path: C:\Users\StarOne\AppData\Roaming\Emby-Server\programdata
	Application directory: C:\Users\StarOne\AppData\Roaming\Emby-Server\system
	SQLitePCL.pretty.SQLiteException: Busy: database is locked - PRAGMA journal_mode
	SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
	   at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement(String sql, String& tail)
	   at SQLitePCL.pretty.DatabaseConnection.PrepareStatement(IDatabaseConnection This, String sql)
	   at Emby.Sqlite.BaseSqliteRepository.CreateConnection(Boolean isReadOnly)
	   at Emby.Server.Sync.SyncRepository.GetJobItemReader[T](SyncJobItemQuery query, String baseSelectText, Func`2 itemFactory)
	   at Emby.Server.Sync.SyncRepository.GetJobItems(SyncJobItemQuery query)
	   at Emby.Server.Sync.SyncManager.GetJobItems(SyncJobItemQuery query)
	   at Emby.Server.Sync.SyncedMediaSourceProvider.GetSyncedItems(BaseItem item)
	   at Emby.Server.Sync.SyncedMediaSourceProvider.GetMediaSources(BaseItem item, CancellationToken cancellationToken)
	   at Emby.Server.Implementations.Library.MediaSourceManager.GetDynamicMediaSources(BaseItem item, IMediaSourceProvider provider, CancellationToken cancellationToken)
	Source: SQLitePCL.pretty
	TargetSite: SQLitePCL.pretty.IStatement PrepareStatement(System.String, System.String ByRef)
Edited by Happy2Play
Link to comment
Share on other sites

Guest asrequested

 

1070 is the exact value, I found out from api

 

Holy overloaded servers, Batman! You'll need a lot of resources for that many users.

Link to comment
Share on other sites

igeoorge
Hi @

 

I don't do transcoding.

CPU is just 10% usage

And already had more users without causing this problem.

 

I was looking through the forum and found a problem similar to mine.

 

I removed the backup plugin and the memory stopped rising.

 

I am still analyzing.

Link to comment
Share on other sites

Happy2Play

 

The problem was not the plugin.
 
I still have the memory leak. Has anyone had this kind of problem?

 

 

Probably not as the majority of users will never have that many users.

 

@@Luke since everything is forced direct play would this have any affect on this?

EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
Link to comment
Share on other sites

igeoorge

A doubt, is there any limit of users?

 

I really don't understand this memory leak
 
It consumes 32gb so quickly.
Edited by igeoorge
Link to comment
Share on other sites

There's no limit but it's probably related to the number of users. We'll have to do more testing with that amount. Thanks.

Link to comment
Share on other sites

igeoorge
Thanks for the reply @@Luke.

 

I've had more users and had no problem with memory.

 

Could this be related to attacks on the server, as I mentioned in another topic?

Link to comment
Share on other sites

JaScoMa

I had the same issue and found that my transcoding-temp folder was eating up all my memory.  I'm running DietPI on a RockPro64 with a eMMC 32GB drive and running the following command, shows the top 10 folders using up the most disk space:

 

du -a /var | sort -n -r | head -n 10
 
16305860        /var
16300624        /var/lib
16198752        /var/lib/emby
15554884        /var/lib/emby/transcoding-temp
350992  /var/lib/emby/metadata
350980  /var/lib/emby/metadata/library
172176  /var/lib/emby/cache
130520  /var/lib/emby/cache/images
130516  /var/lib/emby/cache/images/resized-images
107328  /var/lib/emby/data

 

I recently discovered that I can play MKV blu-ray rips without any issues except for when the audio needs to be transcoded; usually DTS to something else.  But, since the folder grows as the transcoding goes, eventually, I'll run out of space.  MKV file sizes are 20-30GB in size, so transcoding will use up that much.  On a system with 32GB of total drive space, I have to watch my transcode folder.

To remedy the issue, I have a 128GB eMMC on the way and this should resolve the issue.

Link to comment
Share on other sites

igeoorge
Hi friends,
 
Today I discovered something that clarified my mind a lot.
 
I noticed from PRTG that the server starts the memory leak after 14 hours it is on.
 
It's been several days with this problem.
 
Previously the server did not have SMNP, I installed at 3 days and as shown in the graph, the server can hold a little more than 14h until hang.
 
Memory usage is stable for 2 pm.
 
Maximum usage is up to 1.9gb.
 
After 14 hours, the memory takes off up to 32gb, causing the server to crash.
 
I look forward to the next server upgrade, because in the previous version I had this problem.
 
I've had over 1500 users and no memory leaks like now.

 

 

5da6668c5423c_q.png

Edited by igeoorge
Link to comment
Share on other sites

Happy2Play

But when did this start happening since 4.2.1.0 has been out since July 25?

Link to comment
Share on other sites

igeoorge

 

Unfortunately I have no right date, I installed PRTG recently.

 

The server automatically restarts every day at 6:15 am.

 

As it holds a little over 14 hours on, so every day it usually falls between 8pm and 10pm.

 

Tomorrow I will cut this cycle and restart it in the afternoon.

 

If it does not crash between 8:00 pm and 10:00 pm this means that it has a certain period to stay online.

 

Did you get it?

Edited by igeoorge
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...