AddictedCS / soundfingerprinting

Open source audio fingerprinting in .NET. An efficient algorithm for acoustic fingerprinting written purely in C#.
https://emysound.com
MIT License
937 stars 188 forks source link

Emy Container Randomly Shuts Down #188

Closed Hamsterland closed 4 months ago

Hamsterland commented 2 years ago

After I perform a single realtime query, my container randomly shuts down. I receive the exception An exception occured while querying the data source: An established connection was aborted by the software in your host machine. The exit code was 137.

Hamsterland commented 2 years ago
Hosting environment: Production

Content root path: /app

Now listening on: http://0.0.0.0:3340

Application started. Press Ctrl+C to shut down.

2022-04-14 12:36:03.6054 Info [ADMIN] Lucene finished indexing 26131 tracks 

2022-04-14 12:36:41.7373 Info New connection accepted from 172.17.0.1:33062. Total active connections 1 

2022-04-14 12:36:42.2294 Info [ADMIN] Results 29 from 1 tracks returned in (333ms + 51/14ms)) media type Audio, query hashes 49, stream ID  

2022-04-14 12:36:43.5867 Info [ADMIN] Results 38 from 2 tracks returned in (703ms + 1/1ms)) media type Audio, query hashes 81, stream ID  

2022-04-14 12:36:44.6748 Info [ADMIN] Results 27 from 1 tracks returned in (1054ms + 2/1ms)) media type Audio, query hashes 82, stream ID  

2022-04-14 12:36:45.2990 Info [ADMIN] Results 28 from 2 tracks returned in (594ms + 2/8ms)) media type Audio, query hashes 80, stream ID  

2022-04-14 12:36:45.9587 Info [ADMIN] Results 28 from 1 tracks returned in (468ms + 1/1ms)) media type Audio, query hashes 84, stream ID  

2022-04-14 12:36:47.0208 Info [ADMIN] Results 27 from 1 tracks returned in (922ms + 7/3ms)) media type Audio, query hashes 83, stream ID  

2022-04-14 12:36:49.0501 Info [ADMIN] Results 28 from 1 tracks returned in (2011ms + 2/2ms)) media type Audio, query hashes 83, stream ID  

2022-04-14 12:36:49.0926 Info Client 172.17.0.1:33062 disconnected successfully after executing 13 operations on server, closing connection 

2022-04-14 12:37:08.1780 Info New connection accepted from 172.17.0.1:33064. Total active connections 1 

It shuts down at the end without any further logs.

Hamsterland commented 2 years ago

Sometimes the container just turns itself off mid search. This is with my firewall disabled.

Querying Source
Querying Source
Possible Match: Found MY SWEET HEAVEN♂♀ by Gero from Brothers Conflict
Querying Source
Possible Match: Found MY SWEET HEAVEN♂♀ by Gero from Brothers Conflict
Found 1 matches, but they did not pass result entry filter.
Querying Source
Possible Match: Found MY SWEET HEAVEN♂♀ by Gero from Brothers Conflict
Querying Source
Possible Match: Found MY SWEET HEAVEN♂♀ by Gero from Brothers Conflict
Querying Source
Possible Match: Found MY SWEET HEAVEN♂♀ by Gero from Brothers Conflict
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
An exception occured while querying the data source: Server forcibly closed the connection from the client
Querying Source
Final Match: MY SWEET HEAVEN♂♀ by Gero from Brothers Conflict
AddictedCS commented 2 years ago

This problem is specific to your environment setup. One possible cause might be related to not enough RAM allocated to the docker container. You indexed quite a few tracks, hence I suspect it may be related to memory limits.

Hamsterland commented 2 years ago

This problem is specific to your environment setup. One possible cause might be related to not enough RAM allocated to the docker container. You indexed quite a few tracks, hence I suspect it may be related to memory limits.

For that many tracks, how much RAM do you recommend?

AddictedCS commented 2 years ago

It depends how long are these tracks. For every 20 hours of content I recommend 1GB of RAM allocation.

Hamsterland commented 2 years ago

It depends how long are these tracks. For every 20 hours of content I recommend 1GB of RAM allocation.

Thanks. I also wanted to ask: my Docker container takes a very long time to load. I understand I have a lot of songs, but surely 10 minuntes should have been enough time?