Hi,
I am working on a tiny orientdb driver for golang.
I have faced a strange case. when i bench orientdb on my windows laptop
with apache bench it's perfectly OK with any number of requests and
cuncurrency factor.
I have written a small go program which upon getting a request tries to
fetch a document from local database and return it. when i run apache
bench, when concurrency is above 1 then some of requests fail.
it gives this error:
panic serving [::1]:57346: Get http://localhost:2480/document/t1/5:11: EOF
code is here:
func getdoc(addr string) []byte {
client := new(http.Client)
req, err := http.NewRequest("GET", addr, nil)
req.SetBasicAuth("admin","admin")
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
panic(err)
}
return body
}
which is called by "http://localhost:2480/document/t1/5:11" upon each
request.
it seems golang related problem but when i change this url to anything else
(other program written in go, internet sites and many other http servers)
it works perfect. thus i decided to ask the question here.
orientdb version: 2.0.4
windows 8 64 bit
java 8
golang 1.4.1
thanks in advance
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.