Skip to main content

Hi, I recently added a new pair of Sonos SLs to my system that had just one pair, and noticed I was getting time outs from my NAS when trying to play music from my Music Library on the NAS. The playlist would skip about 10 or 20 songs and then finally play one. I’ve traced this problem to the elected sonos speaker in each pair opening up a large amount of SMB connections to my NAS (more than 15 each).  On some older NASs, there is a max connections limit (mine is just 50 per share), and over time considering other stations may connect as well, it exceeds that limit.

 

Why does Sonos need to open up 20 or so connections for each speaker that is playing music from the  local NAS Music Library just to play a single song, and is there any way to limit it? I can’t see that it would need 20 connections from a performance perspective.

 

Here’s an example of what I see on the NAS server coming from the lead speaker in each pair:

 

root@ix4-300d:/usr/local/samba/bin# ./smbstatus

Samba version 4.9.3
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
22476 nobody users 192.168.1.183 (ipv4:192.168.1.183:42294) SMB3_02 - -
15328 nobody users 192.168.1.183 (ipv4:192.168.1.183:40940) SMB3_02 - -
19581 nobody users 192.168.1.139 (ipv4:192.168.1.139:58156) SMB3_02 - -
18170 nobody users 192.168.1.139 (ipv4:192.168.1.139:57604) SMB3_02 - -
17497 nobody users 192.168.1.139 (ipv4:192.168.1.139:57426) SMB3_02 - -
19558 nobody users 192.168.1.139 (ipv4:192.168.1.139:58134) SMB3_02 - -
22482 nobody users 192.168.1.183 (ipv4:192.168.1.183:42306) SMB3_02 - -
17511 nobody users 192.168.1.183 (ipv4:192.168.1.183:41730) SMB3_02 - -
15526 nobody users 192.168.1.183 (ipv4:192.168.1.183:41094) SMB3_02 - -
15324 nobody users 192.168.1.183 (ipv4:192.168.1.183:40932) SMB3_02 - -
15344 nobody users 192.168.1.183 (ipv4:192.168.1.183:40956) SMB3_02 - -
18220 nobody users 192.168.1.139 (ipv4:192.168.1.139:57670) SMB3_02 - -
18177 nobody users 192.168.1.139 (ipv4:192.168.1.139:57616) SMB3_02 - -
16401 nobody users 192.168.1.183 (ipv4:192.168.1.183:41458) SMB3_02 - -
19583 nobody users 192.168.1.139 (ipv4:192.168.1.139:58160) SMB3_02 - -
18218 nobody users 192.168.1.139 (ipv4:192.168.1.139:57666) SMB3_02 - -
18168 nobody users 192.168.1.139 (ipv4:192.168.1.139:57600) SMB3_02 - -
15320 nobody users 192.168.1.183 (ipv4:192.168.1.183:40924) SMB3_02 - -
17486 nobody users 192.168.1.139 (ipv4:192.168.1.139:57422) SMB3_02 - -
18166 nobody users 192.168.1.139 (ipv4:192.168.1.139:57596) SMB3_02 - -
17460 nobody users 192.168.1.183 (ipv4:192.168.1.183:41692) SMB3_02 - -
18222 nobody users 192.168.1.139 (ipv4:192.168.1.139:57674) SMB3_02 - -
15373 nobody users 192.168.1.183 (ipv4:192.168.1.183:40986) SMB3_02 - -
22478 nobody users 192.168.1.183 (ipv4:192.168.1.183:42298) SMB3_02 - -
16334 nobody users 192.168.1.183 (ipv4:192.168.1.183:41410) SMB3_02 - -
15326 nobody users 192.168.1.183 (ipv4:192.168.1.183:40936) SMB3_02 - -
19451 nobody users 192.168.1.139 (ipv4:192.168.1.139:58016) SMB3_02 - -
19542 nobody users 192.168.1.139 (ipv4:192.168.1.139:58112) SMB3_02 - -
17475 nobody users 192.168.1.183 (ipv4:192.168.1.183:41712) SMB3_02 - -
19579 nobody users 192.168.1.139 (ipv4:192.168.1.139:58152) SMB3_02 - -
15322 nobody users 192.168.1.183 (ipv4:192.168.1.183:40928) SMB3_02 - -
19577 nobody users 192.168.1.139 (ipv4:192.168.1.139:58148) SMB3_02 - -
18172 nobody users 192.168.1.139 (ipv4:192.168.1.139:57608) SMB3_02 - -
22484 nobody users 192.168.1.183 (ipv4:192.168.1.183:42310) SMB3_02 - -
17553 nobody users 192.168.1.139 (ipv4:192.168.1.139:57480) SMB3_02 - -
15334 nobody users 192.168.1.183 (ipv4:192.168.1.183:40948) SMB3_02 - -
19417 nobody users 192.168.1.139 (ipv4:192.168.1.139:57978) SMB3_02 - -
15330 nobody users 192.168.1.183 (ipv4:192.168.1.183:40944) SMB3_02 - -
22480 nobody users 192.168.1.183 (ipv4:192.168.1.183:42302) SMB3_02 - -


Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
Music 22484 192.168.1.183 Sat Dec 25 08:20:29 PM 2021 EST - -
Music 15324 192.168.1.183 Sat Dec 25 07:22:43 PM 2021 EST - -
Music 15334 192.168.1.183 Sat Dec 25 07:22:45 PM 2021 EST - -
Music 15318 192.168.1.183 Sat Dec 25 07:22:42 PM 2021 EST - -
Music 15320 192.168.1.183 Sat Dec 25 07:22:42 PM 2021 EST - -
Music 15328 192.168.1.183 Sat Dec 25 07:22:44 PM 2021 EST - -
Music 19577 192.168.1.139 Sat Dec 25 07:52:01 PM 2021 EST - -
Music 17553 192.168.1.139 Sat Dec 25 07:32:27 PM 2021 EST - -
Music 19542 192.168.1.139 Sat Dec 25 07:51:57 PM 2021 EST - -
Music 14975 192.168.1.21 Sat Dec 25 07:19:21 PM 2021 EST - -
Music 18222 192.168.1.139 Sat Dec 25 07:39:33 PM 2021 EST - -
Music 15373 192.168.1.183 Sat Dec 25 07:22:51 PM 2021 EST - -
Music 17460 192.168.1.183 Sat Dec 25 07:32:12 PM 2021 EST - -
Music 19417 192.168.1.139 Sat Dec 25 07:51:36 PM 2021 EST - -
Music 19558 192.168.1.139 Sat Dec 25 07:52:00 PM 2021 EST - -
Music 15330 192.168.1.183 Sat Dec 25 07:22:45 PM 2021 EST - -
Music 17475 192.168.1.183 Sat Dec 25 07:32:15 PM 2021 EST - -
Music 16334 192.168.1.183 Sat Dec 25 07:25:53 PM 2021 EST - -
Music 18220 192.168.1.139 Sat Dec 25 07:39:32 PM 2021 EST - -
Music 17486 192.168.1.139 Sat Dec 25 07:32:17 PM 2021 EST - -
Music 16401 192.168.1.183 Sat Dec 25 07:26:01 PM 2021 EST - -
Music 17497 192.168.1.139 Sat Dec 25 07:32:18 PM 2021 EST - -
Music 22478 192.168.1.183 Sat Dec 25 08:20:27 PM 2021 EST - -
Music 15344 192.168.1.183 Sat Dec 25 07:22:46 PM 2021 EST - -
Music 18166 192.168.1.139 Sat Dec 25 07:39:24 PM 2021 EST - -
Music 17511 192.168.1.183 Sat Dec 25 07:32:19 PM 2021 EST - -
Music 22480 192.168.1.183 Sat Dec 25 08:20:28 PM 2021 EST - -
Music 19581 192.168.1.139 Sat Dec 25 07:52:02 PM 2021 EST - -
Music 19583 192.168.1.139 Sat Dec 25 07:52:03 PM 2021 EST - -
Music 15526 192.168.1.183 Sat Dec 25 07:23:15 PM 2021 EST - -
Music 15326 192.168.1.183 Sat Dec 25 07:22:44 PM 2021 EST - -
Music 18168 192.168.1.139 Sat Dec 25 07:39:24 PM 2021 EST - -
Music 18172 192.168.1.139 Sat Dec 25 07:39:25 PM 2021 EST - -
Music 18218 192.168.1.139 Sat Dec 25 07:39:32 PM 2021 EST - -
Music 19451 192.168.1.139 Sat Dec 25 07:51:42 PM 2021 EST - -
Music 18170 192.168.1.139 Sat Dec 25 07:39:25 PM 2021 EST - -
Music 22476 192.168.1.183 Sat Dec 25 08:20:26 PM 2021 EST - -
Music 18177 192.168.1.139 Sat Dec 25 07:39:27 PM 2021 EST - -
Music 19579 192.168.1.139 Sat Dec 25 07:52:02 PM 2021 EST - -
Music 22482 192.168.1.183 Sat Dec 25 08:20:28 PM 2021 EST - -
Music 15322 192.168.1.183 Sat Dec 25 07:22:43 PM 2021 EST - -

 

Sonos fetches album art as required, via the controller's Associated Product. If you were scrolling through content on your controller it could explain the multiple accesses. 


Thanks. Scrolling through the playlist did not incur more connections but going back to the main play screen and looking at the music library brought up 10 new ones.  Sonos should perhaps figure a way to throttle connections. Nothing should need 50 connections to play music.  I’m not sure most owners of NAS devices know that there is a max connection limit on some of them. The failure mode in the app is non-obvious (songs skip, music library scans take foreever or never finish). I have an older model but maybe the newer Qnaps and Synlogys don’t limit. Limiting something to less than 40 connections seems reasonable.  For the time being I figured out how to increase max connections and lower the global deadtime parameter to help clean up. Not sure if this is a recent problem or something older that was exacerbated by my adding to the system….

 

 


Scrolling through the playlist did not incur more connections but going back to the main play screen and looking at the music library brought up 10 new ones.

This would be logical, as the tracks in the playlist would probably have had recent artwork cached in the controller. 

I’ve used Sonos with local network storage for 14+ years and confess I’ve not been aware of hitting any kind of connection limit on the storage itself. (At one time I was accessing the storage through a poorly equipped router and hit a NAT table limit, but that’s a different matter.) 


My NAS is a very old ix4-300d, and lenovo decided to set every share to max connections = 50, and that is not a user modifiable parameter (unless you mess with the internals). There is no error on the NAS either when it hits the limit, so it fails silently on my server and just causes all strange behavior in the Sonos app.   I never had a problem since I’ve been using Sonos until now, but unfortunately I added a new speaker pair and upgraded the FW (was forced to), so it is hard to tell it something changed in the FW or if it has always been that way and adding the new speaker set just brought it to light.


Maybe a way to work around the old NAS limit?

If you set up a computer as an SMB gateway to the old NAS the multiple connections would go to the gateway and be aggregated into the single connection to the old NAS. You could use SMB or any other supported protocol for the gateway to NAS link.

I made a gateway here using a Raspberry Pi but the instructions should be pretty close for any SMB enabled computer.

SMB v1 Gateway


Yes thanks that would work too. I did find a way to mess with the internals and increased the max connections to 100 and set deadtime to 3 days. I just thought it unusual for sonos to open that many connections to the NAS, and thought there might be some way to limit the number of connections or worker threads that are creating the connection, at the sonos end…. Seems like 40 or so connections is a bit much for what it needs to do :-)


In light of

I would remove the “Answered” flag from this thread.


Sonos fetches album art as required, via the controller's Associated Product. If you were scrolling through content on your controller it could explain the multiple accesses. 

I’ve noticed that even if you remove the music library from the Sonos app, if you have any playlists that include music from the NAS, the associated product will make calls to the NAS to retrieve artwork for the songs in the playlist. I’ve also noticed that these calls will use SMB1 and fail if you have SMB1 disabled on your NAS. The connection will fall back to SMB3 which seems backwards to me. The sonos system should be attempting SMB3 first (more secure) and then falling back to SMB1.


I just stumbled on this thread. I am having issues with SONOS Playlist not working correctly on my iPhones and iPads. The SONOS Playlist will randomly appear and disappear form the iPhones and iPads. SONOS technical support was able to determine that is being caused by timeouts on the SONOSO browse request,

I have technical case open with them and we are working through the issues.

I am using the SYNOLOGY DS1821+ NAS with the latest released version of DSM. Currently SONOS is using SMB3 to connect to the NAS.

Does anyone know the maximum number of SMB connections that are allowed on a SYNOLOGY NAS?

Does anyone know how to determine how many active connections are being utilized on the SYNOLOGY NAS?

 


Connect your speakers to the LAN (not wifi) to rule out wifi disconnects.

 

smbstatus command shows connected clients.

 

The max connection limit is the the “max connections” parameter of smb.conf PER SHARE. Synology may have a web ui for it.

 


Connect your speakers to the LAN (not wifi) to rule out wifi disconnects.

 

smbstatus command shows connected clients.

 

The max connection limit is the the “max connections” parameter of smb.conf PER SHARE. Synology may have a web ui for it.

 

Where do I run this command on the SYNOLOGY NAS?