Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurs while inserting a lot of records #27

Open
okkez opened this issue May 24, 2017 · 3 comments
Open

Error occurs while inserting a lot of records #27

okkez opened this issue May 24, 2017 · 3 comments

Comments

@okkez
Copy link
Member

okkez commented May 24, 2017

I'm trying to load records from some CSV files.
CSV files include about 10000 records in a file.

I got following errors sometimes.
(sometimes load all records successfully)

groonga-client-0.5.0/lib/groonga/client/protocol/http/synchronous.rb:56:in `rescue in send': Failed to open TCP connection to 127.0.0.1:10041 (Cannot assign requested address - connect(2) for "127.0.0.1" port 10041) (Groonga::Client::Protocol::WrappedError)
        from /home/xxx/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/groonga-client-0.5.0/lib/groonga/client/protocol/http/synchronous.rb:38:in `send'
        from /home/xxx/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/groonga-client-0.5.0/lib/groonga/client/protocol/http/thread.rb:39:in `block in send'
bin/rails r data/load-ekidata.rb all  29.60s user 25.25s system 94% cpu 58.137 total

Why?

@okkez
Copy link
Member Author

okkez commented May 24, 2017

I'm using groonga-client via groonga-client-model.

@komainu8
Copy link
Member

Probably, this error cause is lack ephemeral port in OS.
When error occur, Would you execute ss -tan | awk '{print $1}' | uniq -c and count number of TIME_WAIT?

@okkez
Copy link
Member Author

okkez commented Jun 1, 2017

I could not take log at the time when error occurred.
This is log just before error occurred.

$  ss -tan | awk '{print $1}' | sort | uniq -c
      7 CLOSE-WAIT
    101 ESTAB
     33 LISTEN
      1 State
  25683 TIME-WAIT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants