Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Exceeded max number of connections. Waiting 60 seconds

Open jfrobichaud opened this issue 7 years ago • 9 comments

Hi, while running the Export-O365Configuration I get this: Every 60 Seconds the same warning appear and it doesn't seem to go through.

Extracting EXOSharedMailbox... WARNING: Exceeded max number of connections. Waiting 60 seconds WARNING: Exceeded max number of connections. Waiting 60 seconds WARNING: Exceeded max number of connections. Waiting 60 seconds WARNING: Exceeded max number of connections. Waiting 60 seconds

Thanks

jfrobichaud avatar Jul 05 '19 12:07 jfrobichaud

That is currently the expected behavior with the Exchange Online Management Shell, where there can only be 3 connections made. This normally happens if you ran Export-O365COnfiguration a few times. It is annoying and we are working with the team to find better alternatives that wouldn't require us to forcibly close the connections after every call to EXO, which would have a major negative impact on performance. Leave it running, and the moment one of the connection frees up, it will pick up the extraction. Note that this can sometimes take several minutes to happen.

NikCharlebois avatar Jul 05 '19 13:07 NikCharlebois

ok thanks

jfrobichaud avatar Jul 05 '19 13:07 jfrobichaud

Still doing this after 1h, is that something I can do to get a connection ? Thanks

jfrobichaud avatar Jul 05 '19 18:07 jfrobichaud

Get-PSSession | Remove-PSSession will clear all potential connections, but DSC executes in a different context so you may not be able to close its sessions.

NikCharlebois avatar Jul 05 '19 18:07 NikCharlebois

I have been able to reproduce a similar behavior where the Connect-EXO cmdlet retries to connect in an endless loop whenever I use an extraction account that doesn’t have Admin access to Exchange Online. Make sure the account has proper privileges or unchecks all EXO related components before trying the extraction.

NikCharlebois avatar Jul 12 '19 13:07 NikCharlebois

I'm trying to extract O365AdminAuditLogConfig and I don't seem to be able to get a connection after letting the script run for 1 hour.

jfrobichaud avatar Jul 12 '19 15:07 jfrobichaud

Please see related issue opened within the Auth module

https://github.com/microsoft/MSCloudLoginAssistant/issues/1

NikCharlebois avatar Jul 12 '19 19:07 NikCharlebois

@jfrobichaud please confirm that this is now fixed for you.

NikCharlebois avatar Aug 01 '19 13:08 NikCharlebois

Fixed, thanks.

jfrobichaud avatar Aug 01 '19 14:08 jfrobichaud