{"action":"created","issue":{"url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1937","labels_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1937/labels{/name}","comments_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1937/comments","events_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1937/events","html_url":"https://github.com/Atmosphere/atmosphere/issues/1937","id":66923586,"number":1937,"title":"Multiple threads call AtmosphereResource.write(), websocket stops working","user":{"login":"agherardi","id":2007228,"avatar_url":"https://avatars.githubusercontent.com/u/2007228?v=3","gravatar_id":"","url":"https://api.github.com/users/agherardi","html_url":"https://github.com/agherardi","followers_url":"https://api.github.com/users/agherardi/followers","following_url":"https://api.github.com/users/agherardi/following{/other_user}","gists_url":"https://api.github.com/users/agherardi/gists{/gist_id}","starred_url":"https://api.github.com/users/agherardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agherardi/subscriptions","organizations_url":"https://api.github.com/users/agherardi/orgs","repos_url":"https://api.github.com/users/agherardi/repos","events_url":"https://api.github.com/users/agherardi/events{/privacy}","received_events_url":"https://api.github.com/users/agherardi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Atmosphere/atmosphere/labels/Documentation","name":"Documentation","color":"d7e102"},{"url":"https://api.github.com/repos/Atmosphere/atmosphere/labels/not%20a%20bug","name":"not a bug","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-07T16:02:20Z","updated_at":"2015-06-13T18:30:28Z","closed_at":"2015-04-07T18:49:53Z","body":"Hi,\r\nI'm using Atmosphere 2.2.0. In my application, multiple threads can concurrently call AtmosphereResource.write() on the same AtmosphereResoiurce object. I noticed that under load, after a while the websocket stops working - no data is being received by the websocket client.\r\n\r\nI'm not sure whether this is an issue or whether AtmosphereResource.write() is not multi-thread safe by design. And if it's not multi-thread safe by design, is the recommended workaround to serialize calls to AtmosphereResource.write() in the application?\r\n\r\nThank you in advance,\r\nAlessandro"},"comment":{"url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/comments/111738603","html_url":"https://github.com/Atmosphere/atmosphere/issues/1937#issuecomment-111738603","issue_url":"https://api.github.com/repos/Atmosphere/atmosphere/issues/1937","id":111738603,"user":{"login":"agherardi","id":2007228,"avatar_url":"https://avatars.githubusercontent.com/u/2007228?v=3","gravatar_id":"","url":"https://api.github.com/users/agherardi","html_url":"https://github.com/agherardi","followers_url":"https://api.github.com/users/agherardi/followers","following_url":"https://api.github.com/users/agherardi/following{/other_user}","gists_url":"https://api.github.com/users/agherardi/gists{/gist_id}","starred_url":"https://api.github.com/users/agherardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agherardi/subscriptions","organizations_url":"https://api.github.com/users/agherardi/orgs","repos_url":"https://api.github.com/users/agherardi/repos","events_url":"https://api.github.com/users/agherardi/events{/privacy}","received_events_url":"https://api.github.com/users/agherardi/received_events","type":"User","site_admin":false},"created_at":"2015-06-13T18:30:28Z","updated_at":"2015-06-13T18:30:28Z","body":"Ouch - we're running version 2.2.0-RC1, which doesn't have the synchronize.\r\n\r\nDo you recommend upgrading to 2.2.7 or to 2.3.X?"}}