{"action":"created","issue":{"url":"https://api.github.com/repos/eosnewyork/eospy/issues/11","repository_url":"https://api.github.com/repos/eosnewyork/eospy","labels_url":"https://api.github.com/repos/eosnewyork/eospy/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/eosnewyork/eospy/issues/11/comments","events_url":"https://api.github.com/repos/eosnewyork/eospy/issues/11/events","html_url":"https://github.com/eosnewyork/eospy/issues/11","id":372532629,"node_id":"MDU6SXNzdWUzNzI1MzI2Mjk=","number":11,"title":"why push_transaction is very slow","user":{"login":"hmilymb","id":3439155,"node_id":"MDQ6VXNlcjM0MzkxNTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3439155?v=4","gravatar_id":"","url":"https://api.github.com/users/hmilymb","html_url":"https://github.com/hmilymb","followers_url":"https://api.github.com/users/hmilymb/followers","following_url":"https://api.github.com/users/hmilymb/following{/other_user}","gists_url":"https://api.github.com/users/hmilymb/gists{/gist_id}","starred_url":"https://api.github.com/users/hmilymb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmilymb/subscriptions","organizations_url":"https://api.github.com/users/hmilymb/orgs","repos_url":"https://api.github.com/users/hmilymb/repos","events_url":"https://api.github.com/users/hmilymb/events{/privacy}","received_events_url":"https://api.github.com/users/hmilymb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-22T13:58:01Z","updated_at":"2018-10-23T17:08:06Z","closed_at":null,"author_association":"NONE","body":"```\r\n        actions = []\r\n        t1 = time.time()\r\n        for bet in bet_list:\r\n            betid = bet['id']\r\n            server_seed = bet['server_seed']\r\n            act = make_push_data(ce, from_, betid, server_seed)\r\n            actions.append(act)\r\n\r\n        trx = {\"actions\": actions}\r\n        key = 'xxx'\r\n        t2 = time.time()\r\n        resp = ce.push_transaction(trx, key, broadcast=True)\r\n        t3 = time.time()\r\n        logger.info(\"testpush t1 %f t2 %f, len %d ,%s \" % (t2-t1, t3-t2, len(bet_list), consts.chain_url))\r\n```\r\n\r\n\r\nlog: http://172.31.129.125:8888 is my localhost ip.\r\n```\r\n\r\ncron_2018_10_22_20.log:2018-10-22 12:52:21,441 cron [reveal3.py:208] [reveal3:reveal] [INFO]- testpush t1 0.113391 t2 1.053547, len 1 ,http://172.31.129.125:8888\r\ncron_2018_10_22_20.log:2018-10-22 12:52:40,241 cron [reveal3.py:208] [reveal3:reveal] [INFO]- testpush t1 0.023461 t2 1.105462, len 1 ,http://172.31.129.125:8888\r\ncron_2018_10_22_20.log:2018-10-22 12:52:48,445 cron [reveal3.py:208] [reveal3:reveal] [INFO]- testpush t1 0.010504 t2 1.122615, len 1 ,http://172.31.129.125:8888\r\ncron_2018_10_22_20.log:2018-10-22 12:53:14,952 cron [reveal3.py:208] [reveal3:reveal] [INFO]- testpush t1 0.052556 t2 0.926066, len 1 ,http://172.31.129.125:8888\r\ncron_2018_10_22_20.log:2018-10-22 12:53:24,333 cron [reveal3.py:208] [reveal3:reveal] [INFO]- testpush t1 0.296603 t2 1.130232, len 1 ,http://172.31.129.125:8888\r\ncron_2018_10_22_20.log:2018-10-22 12:53:33,696 cron [reveal3.py:208] [reveal3:reveal] [INFO]- testpush t1 0.028622 t2 0.687707, len 1 ,http://172.31.129.125:8888\r\ncron_2018_10_22_20.log:2018-10-22 12:53:44,111 cron [reveal3.py:208] [reveal3:reveal] [INFO]- testpush t1 0.113310 t2 2.136775, len 1 ,http://172.3\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/eosnewyork/eospy/issues/comments/432335192","html_url":"https://github.com/eosnewyork/eospy/issues/11#issuecomment-432335192","issue_url":"https://api.github.com/repos/eosnewyork/eospy/issues/11","id":432335192,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjMzNTE5Mg==","user":{"login":"hmilymb","id":3439155,"node_id":"MDQ6VXNlcjM0MzkxNTU=","avatar_url":"https://avatars1.githubusercontent.com/u/3439155?v=4","gravatar_id":"","url":"https://api.github.com/users/hmilymb","html_url":"https://github.com/hmilymb","followers_url":"https://api.github.com/users/hmilymb/followers","following_url":"https://api.github.com/users/hmilymb/following{/other_user}","gists_url":"https://api.github.com/users/hmilymb/gists{/gist_id}","starred_url":"https://api.github.com/users/hmilymb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmilymb/subscriptions","organizations_url":"https://api.github.com/users/hmilymb/orgs","repos_url":"https://api.github.com/users/hmilymb/repos","events_url":"https://api.github.com/users/hmilymb/events{/privacy}","received_events_url":"https://api.github.com/users/hmilymb/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T17:08:06Z","updated_at":"2018-10-23T17:08:06Z","author_association":"NONE","body":"but i had other problem， post data hanging\r\non resp = ce.push_transaction(trx, key, broadcast=True)\r\n```\r\n● update_open.service - gunicorn daemon\r\n   Loaded: loaded (/etc/systemd/system/update_open.service; disabled; vendor preset: enabled)\r\n   Active: active (running) since Wed 2018-10-24 00:08:58 CST; 45min ago\r\n Main PID: 3581 (python3)\r\n    Tasks: 1\r\n   Memory: 45.1M\r\n      CPU: 51.803s\r\n   CGroup: /system.slice/update_open.service\r\n           └─3581 /home/nb/virtualenv/bin/python3 shell/update_open.py > /dev/null 2>&1 &\r\n\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: get game account  eoswinonennn\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: get game account  eoswinonennn\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: get game account  eoswinonennn\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: get game account  eoswinonennn\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: get game account  eoswinonennn\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: get reveal account  eoswinonennn\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: account push  eoswinonennn\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: push  {'transaction_id': 'c74dcd691a1951cb717ea5b8c8d9b70341159ba954feb2c8f5efbe9e9f5e70c7',\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: st': '5430b24a80e720d46bfdc2d24c1f9cba3ca82ab430a31db35566954bcef3fc02', 'global_sequence':\r\nOct 24 00:12:35 iZj6c5tuedcseyv7tmwgdcZ python3[3581]: ization': [{'actor': 'eoswinonennn', 'permission': 'active'}], 'data': {'from': 'eoswinonenn\r\n```\r\n```\r\nroot@iZj6c5tuedcseyv7tmwgdcZ:~# strace -p 3581\r\nstrace: Process 3581 attached\r\nrecvfrom(17,\r\n\r\n```\r\n\r\nand i think it maybe because no set requests timeout 。\r\nhttp://docs.python-requests.org/en/master/user/quickstart/#timeouts"}}
{"actor":{"display_login":"hmilymb"}}