{"action":"created","issue":{"url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/255","repository_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk","labels_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/255/comments","events_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/255/events","html_url":"https://github.com/irazasyed/telegram-bot-sdk/issues/255","id":179992709,"number":255,"title":"Maximum execution time of 180 seconds exceeded in vendor\\guzzlehttp\\guzzle\\src\\Handler\\CurlMultiHandler.php","user":{"login":"Decadence","id":1434668,"avatar_url":"https://avatars.githubusercontent.com/u/1434668?v=3","gravatar_id":"","url":"https://api.github.com/users/Decadence","html_url":"https://github.com/Decadence","followers_url":"https://api.github.com/users/Decadence/followers","following_url":"https://api.github.com/users/Decadence/following{/other_user}","gists_url":"https://api.github.com/users/Decadence/gists{/gist_id}","starred_url":"https://api.github.com/users/Decadence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Decadence/subscriptions","organizations_url":"https://api.github.com/users/Decadence/orgs","repos_url":"https://api.github.com/users/Decadence/repos","events_url":"https://api.github.com/users/Decadence/events{/privacy}","received_events_url":"https://api.github.com/users/Decadence/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-29T09:11:29Z","updated_at":"2016-10-03T14:02:48Z","closed_at":null,"body":"I use Laravel Facade and `irazasyed/telegram-bot-sdk: \"^2.0\"`\r\n\r\n```php\r\nforeach ($telegram_users as $info) {\r\n            Telegram::setAsyncRequest(true);\r\n\r\n            $message = Telegram::sendMessage([\r\n                \"chat_id\" => $info->chat_id,\r\n                \"text\" => $message,\r\n                \"disable_web_page_preview\" => true,\r\n            ]);\r\n}\r\n```\r\n\r\nI think it happens when users is more than one (and chat_id can be repeated).\r\n\r\nWith sync request all is fine.\r\nWith async PHP script just hangs.\r\n\r\nError Log:\r\n\r\n```\r\nPHP Fatal error:  Maximum execution time of 180 seconds exceeded in vendor\\guzzlehttp\\guzzle\\src\\Handler\\CurlMultiHandler.php on line 163\r\n[28-Sep-2016 15:47:21 Europe/Moscow] PHP Stack trace:\r\n[28-Sep-2016 15:47:21 Europe/Moscow] PHP   1. Telegram\\Bot\\HttpClients\\GuzzleHttpClient->__destruct() vendor\\irazasyed\\telegram-bot-sdk\\src\\HttpClients\\GuzzleHttpClient.php:0\r\n[28-Sep-2016 15:47:21 Europe/Moscow] PHP   2. GuzzleHttp\\Promise\\unwrap() vendor\\irazasyed\\telegram-bot-sdk\\src\\HttpClients\\GuzzleHttpClient.php:57\r\n[28-Sep-2016 15:47:21 Europe/Moscow] PHP   3. GuzzleHttp\\Promise\\Promise->wait()\r\n...\r\n```"},"comment":{"url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/comments/251113772","html_url":"https://github.com/irazasyed/telegram-bot-sdk/issues/255#issuecomment-251113772","issue_url":"https://api.github.com/repos/irazasyed/telegram-bot-sdk/issues/255","id":251113772,"user":{"login":"irazasyed","id":1915268,"avatar_url":"https://avatars.githubusercontent.com/u/1915268?v=3","gravatar_id":"","url":"https://api.github.com/users/irazasyed","html_url":"https://github.com/irazasyed","followers_url":"https://api.github.com/users/irazasyed/followers","following_url":"https://api.github.com/users/irazasyed/following{/other_user}","gists_url":"https://api.github.com/users/irazasyed/gists{/gist_id}","starred_url":"https://api.github.com/users/irazasyed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irazasyed/subscriptions","organizations_url":"https://api.github.com/users/irazasyed/orgs","repos_url":"https://api.github.com/users/irazasyed/repos","events_url":"https://api.github.com/users/irazasyed/events{/privacy}","received_events_url":"https://api.github.com/users/irazasyed/received_events","type":"User","site_admin":false},"created_at":"2016-10-03T14:02:48Z","updated_at":"2016-10-03T14:02:48Z","body":"- How many users are you trying to send this message to?\r\n- What's your tech stack?\r\n\r\nAlso, You don't have to set `Telegram::setAsyncRequest(true);` before every request in loop. Just set this outside the loop once to apply it for all. It's a global config."}}
{"actor":{"display_login":"irazasyed"}}