FAQ
Hi

Background:

    I made a server program with golang, it receives requests and creates
a gorouting to insert the data from the request for each request. And I
also created a client with golang, and sends the request with it on three
computers. Each of the client will send 20000 requests, so the total
number is 60000, and in theory, there will be 60000 records in the
database. But I found the number of the records is often less than 60000, I
also log the request number on the server side, the requests number is
correct which is 60000.



--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • James Wendel at Mar 26, 2014 at 5:17 pm
    Are you certain each of the sql.Exec calls is completely successfully? Are
    you watching the error return from each to make sure they complete without
    issue? Any number of issues can cause an SQL insert to fail, so you need
    to start with the error return code, and also check the mysql logs to see
    if there are any problems.

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Tamás Gulácsi at Mar 26, 2014 at 6:12 pm
    Do you COMMIT successfully?

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jmwendel at Mar 26, 2014 at 8:49 pm
    Sounds like inserts are failing for some reason? Have you checked the
    mysql logs to see if any errors? Also, do you check the err returned by
    sql.Exec? It's possible the you're getting failed inserts due to the
    number of connections to the database or some other problem.

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 26, '14 at 1:37p
activeMar 26, '14 at 8:49p
posts4
users3
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase