问题描述:

I'm creating strings out of JSON serialized structs and running a PUBLISH command on a redis connection this this.

_, err := r.Do("PUBLISH", key, ncs)

This go service is used in to process/repurpose all of the messages that get sent on our chat application, and then pub sub the events back to the clients.

Every so often the redis connection spits an error after the doing a PUBLISH command and it's one of the following:

  • redigo: bad response line terminator
  • redigo: unexpected response line

Have not been able to make sense of these and the error keeps showing up, what do these responses mean? && why might they be occurring for me?

网友答案:

The application is accessing the connection concurrently. The allowed concurrency is discussed in the documentation. Consider using a pool.

相关阅读:
Top