Giter VIP home page Giter VIP logo

Comments (8)

garyburd avatar garyburd commented on August 19, 2024
[ERROR] [16:25:27] [NestPrepare @ class.go.29] GetName err: redigo: connection pool closed

The application used a connection after closing the connection.

[ERROR] [16:25:33] [NestPrepare @ class.go.29] GetName err: short write

Concurrent writes to a connection can cause this error. See http://godoc.org/github.com/garyburd/redigo/redis#hdr-Concurrency for information on the concurrency allowed by Redigo.

 [ERROR] [16:25:33] [NestPrepare @ class.go.29] GetName err: use of closed network connection

I don't know what this error is. If you log the error type, I might be able to figure out what it is

[ERROR] [16:25:33] [app.Rset error: redigo: unexpected type for Values, got type string

The application is assuming that a string value returned by the server is a multi-bulk value.

from redigo.

Icedroid avatar Icedroid commented on August 19, 2024

I get many many these errors, then my web application shut down. I need your help.Thank you very much.

[ERROR] [23:24:59] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:24:59] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:24:59] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:24:59] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:24:59] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:24:59] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:25:00] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:25:00] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string
[ERROR] [23:25:00] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string

But I restart my web application. It run good for sometime.After run for an hour or more than. Suddenly get these errors and it always got these errors writed to my log file. Can't get any response to my user.

from redigo.

garyburd avatar garyburd commented on August 19, 2024
 [ERROR] [23:25:00] [Prepare @ base.go.77] app.Rset error: redigo: unexpected type for Values, got type string

This error is caused by a bug in your application code. I cannot debug your application code from an error message.

from redigo.

Icedroid avatar Icedroid commented on August 19, 2024

@garyburd Could you help me check my code. the main problem happen in the package models App.Rset() method.
https://github.com/Icedroid/MM_Api

from redigo.

garyburd avatar garyburd commented on August 19, 2024

Your application writes concurrently to a Redis connection. Concurrent writes are not supported.

from redigo.

Icedroid avatar Icedroid commented on August 19, 2024

I am a golang newbie. Could you tell me how to change my code to use redis conn rightly.Could you give me some code how to rewrite my app.Rset() method?

from redigo.

garyburd avatar garyburd commented on August 19, 2024

As the documentation states, create the pool once. A request handler should get a connection from the pool and close the connection when the handler is done:

conn := pool.Get()
defer conn.Close()
// do something with the connection

I don't have time to write code for your application.

from redigo.

Icedroid avatar Icedroid commented on August 19, 2024

I used it as you say. A controller when New a model will get a redis conn belong to this model and close it when this controller finished.

m.redis = RedisPool.Get()

from redigo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.