Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upConcurrency issues #613
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Unknwon
Nov 7, 2014
Member
Thanks your feedback!
But I think the change you made just make macaron can only handle 1 request at a time? Not sure.
I've did ab test on 1000 connections and 10000 requests and didn't seem to have this random situation, so can you provide more information?
|
Thanks your feedback! But I think the change you made just make macaron can only handle 1 request at a time? Not sure. I've did ab test on 1000 connections and 10000 requests and didn't seem to have this random situation, so can you provide more information? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andyleap
Nov 7, 2014
Contributor
I just put compiled a -race build and there are data races ALL OVER THE PLACE. There's some seriously bad stuff going on here.
|
I just put compiled a -race build and there are data races ALL OVER THE PLACE. There's some seriously bad stuff going on here. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Unknwon
Nov 7, 2014
Member
Good point, haven't tried -race flag before. BTW, is this should be considered as Gogs issue or Macaron?
|
Good point, haven't tried |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andyleap
Nov 7, 2014
Contributor
There's data races in the cron, in the orm, in the captcha, and that's just what I've seen in 5 minutes. I'd say it's an everywhere issue...
|
There's data races in the cron, in the orm, in the captcha, and that's just what I've seen in 5 minutes. I'd say it's an everywhere issue... |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
In my point of view, as long as no deadlock..data race is unavoidable. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andyleap
Nov 7, 2014
Contributor
I really don't mean to be rude, but they are hardly unavoidable, and while not causing deadlocks, they are causing issues. I'm not sure I can use this software as it is.
|
I really don't mean to be rude, but they are hardly unavoidable, and while not causing deadlocks, they are causing issues. I'm not sure I can use this software as it is. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Unknwon
Nov 7, 2014
Member
If to use things like sync.Mutex, I think there is really no concurrent at all, just a single thread..
|
If to use things like |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andyleap
Nov 7, 2014
Contributor
and if I don't, I get 404's on explore, dashboard, user profiles, and more. Think I'll take single thread over that.
|
and if I don't, I get 404's on explore, dashboard, user profiles, and more. Think I'll take single thread over that. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Unknwon
Nov 7, 2014
Member
What is your system and version of Gogs? And is it possible to reproduce on https://try.gogs.io?
|
What is your system and version of Gogs? And is it possible to reproduce on https://try.gogs.io? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andyleap
Nov 7, 2014
Contributor
0.5.7.1105 Beta on linux. Tried ab against it compiled without the mutex, and gogs crashed.
|
0.5.7.1105 Beta on linux. Tried ab against it compiled without the mutex, and gogs crashed. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andyleap
Nov 7, 2014
Contributor
With roughly 99,950 or so lines of stack traces and an error of too many open files.
|
With roughly 99,950 or so lines of stack traces and an error of too many open files. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Unknwon
Nov 7, 2014
Member
0.5.7.1105 Beta on linux. Tried ab against it compiled without the mutex, and gogs crashed.
What is the behave of crashed of Gogs?
With roughly 99,950 or so lines of stack traces and an error of too many open files.
This is limited by your ulimit -n.
What is the behave of
This is limited by your |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lifeofguenter
Nov 14, 2014
Is this maybe the reason why sometimes the avatar won't load?
-> I have avatar caching activated
-> on a site where a lot of avatars are being loaded (logged in -> dashboard)
-> avatar cache is being refreshed
Result:
-> some avatars (or all) do not load.
Also some improvements I would make with the avatar caching:
- ability to configure the TTL, per default it can be at least a day (though thinking that even 7-30 days is ok)
- add an expire header with the same value of the TTL, so client does not need to download the avatar each time
- fix the ETAG (currently it is "Etag:size(80)"
lifeofguenter
commented
Nov 14, 2014
|
Is this maybe the reason why sometimes the avatar won't load? -> I have avatar caching activated Result: Also some improvements I would make with the avatar caching:
|
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@lifeofguenter thanks your info! I'll take a look ASAP. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
andyleap
Mar 4, 2015
Contributor
With roughly 99,950 or so lines of stack traces and an error of too many open files.
This is limited by your ulimit -n.
Simple load test shouldn't kill the server due to open file limits, that's insane.
Is this maybe the reason why sometimes the avatar won't load?
-> I have avatar caching activated
-> on a site where a lot of avatars are being loaded (logged in -> dashboard)
-> avatar cache is being refreshed
Result:
-> some avatars (or all) do not load.
Yeah, I was having this issue to, tracked it down to the server randomly throwing 404's on the avatar urls. Disabling concurrency fixed it right away.
Simple load test shouldn't kill the server due to open file limits, that's insane.
Yeah, I was having this issue to, tracked it down to the server randomly throwing 404's on the avatar urls. Disabling concurrency fixed it right away. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
@andyleap thanks for the update! |
Unknwon
added
the
status/needs reproduce
label
Mar 25, 2015
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Unknwon
Nov 13, 2015
Member
The primary race problem should have been fixed by Macaron itself. So close this now.
|
The primary race problem should have been fixed by Macaron itself. So close this now. |
andyleap commentedNov 7, 2014
Something is making the application return 404's randomly when refreshing too fast. The errors happen all over the place, even at the home url "/". The issue seems to be that something can't handle concurrent access, as when I wrap the macaron http handler in a func like
and pass that like
http.ListenAndServe(listenAddr, http.HandlerFunc(handler)), everything works fine.Rather serious issue if the system can't handle multiple requests at once.....