Hi all,

I'm having an issue with a messaging server I'm trying to write in Go (my 
first real Go project). I'm having an issue that I've not come across 
before in Go - the code executes as expected, then hangs after a second or 
so indefinitely, no errors, no logs showing it's exited. The code is 
available here 
<https://gitlab.com/samisagit/go-im-server/blob/changed-redis-handler-buggy/src/main.go#L110>.
 
The functions of note are RedisWriteHandler and addRedisSender. In func 
main I'm seeding a channel with the max amount of items (currently 100k) 
then starting RedisWriteHandler, this should auto scale up and down 
according to the length of the channel. However before it gets a chance to 
scale down it hangs. I've checked with redis-cli and the senders are still 
connected, but no more messages are coming though. Unfortunately I can't 
replicate this in the go playground as it's never going to return, and it 
will take too long and get kicked. I also asked this question here 
<https://stackoverflow.com/questions/50129226/golang-channels-getting-stuck> 
but it seems to have gone quiet.

Based on comments from a couple other questions in this group I've killed 
the process manually to get the stack trace which I'll attach, hopefully 
this is helpful.

Any thoughts would be greatly appreciated!

Thanks,

Sam

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: stacktrack-go-redis
Description: Binary data

Reply via email to