dfelton / kobens-gemini

Application for facilitating trades on the Gemini exchange.
9 stars 1 forks source link

TradeRepeater\Buyer - GatewayTimeoutException #197

Open dfelton opened 3 years ago

dfelton commented 3 years ago
Shutdown Enabled at: 2021-05-10 21:39:20
Exception: Kobens\Http\Exception\Status\ServerError\GatewayTimeoutException
Code: 504
Message: Server Error
Strace:
#0 src/Api/Rest/PrivateEndpoints/Request.php(119): Kobens\Gemini\Api\Helper\ResponseHandler->handleResponse(Object(Kobens\Core\Http\Response))
#1 src/Api/Rest/PrivateEndpoints/OrderPlacement/NewOrder/ForceMaker.php(62): Kobens\Gemini\Api\Rest\PrivateEndpoints\Request->getResponse('/v1/order/new', Array)
#2 src/Command/Command/TradeRepeater/Buyer.php(161): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderPlacement\NewOrder\ForceMaker->place(Object(Kobens\Gemini\Exchange\Currency\Pair), 'buy', '0.00002', '52373.99', 'repeater_5114_b...')
#3 src/Command/Command/TradeRepeater/Buyer.php(130): Kobens\Gemini\Command\Command\TradeRepeater\Buyer->place(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Kobens\Gemini\TradeRepeater\Model\Trade), 'repeater_5114_b...')
#4 src/Command/Command/TradeRepeater/Buyer.php(102): Kobens\Gemini\Command\Command\TradeRepeater\Buyer->mainLoop(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 vendor/symfony/console/Command/Command.php(255): Kobens\Gemini\Command\Command\TradeRepeater\Buyer->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Kobens\Gemini\Command\Command\TradeRepeater\Buyer), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 bin/gemini(443): Symfony\Component\Console\Application->run()
#10 {main}

Previous Exception:
Exception: Exception
Code: 0
Message: {"body":"<html>\r\n<head><title>504 Gateway Time-out<\/title><\/head>\r\n<body>\r\n<center><h1>504 Gateway Time-out<\/h1><\/center>\r\n<\/body>\r\n<\/html>\r\n","response_code":504}
Strace:
#0 src/Api/Rest/PrivateEndpoints/Request.php(119): Kobens\Gemini\Api\Helper\ResponseHandler->handleResponse(Object(Kobens\Core\Http\Response))
#1 src/Api/Rest/PrivateEndpoints/OrderPlacement/NewOrder/ForceMaker.php(62): Kobens\Gemini\Api\Rest\PrivateEndpoints\Request->getResponse('/v1/order/new', Array)
#2 src/Command/Command/TradeRepeater/Buyer.php(161): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderPlacement\NewOrder\ForceMaker->place(Object(Kobens\Gemini\Exchange\Currency\Pair), 'buy', '0.00002', '52373.99', 'repeater_5114_b...')
#3 src/Command/Command/TradeRepeater/Buyer.php(130): Kobens\Gemini\Command\Command\TradeRepeater\Buyer->place(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Kobens\Gemini\TradeRepeater\Model\Trade), 'repeater_5114_b...')
#4 src/Command/Command/TradeRepeater/Buyer.php(102): Kobens\Gemini\Command\Command\TradeRepeater\Buyer->mainLoop(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 vendor/symfony/console/Command/Command.php(255): Kobens\Gemini\Command\Command\TradeRepeater\Buyer->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Kobens\Gemini\Command\Command\TradeRepeater\Buyer), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 bin/gemini(443): Symfony\Component\Console\Application->run()
#10 {main}
dfelton commented 3 years ago

Example DB Status for record after this scenario:

                  id: 5114
          is_enabled: 1
            is_error: 1
              status: BUY_SENT
              symbol: yfiusd
 buy_client_order_id: repeater_5114_buy_1620682699.7985
        buy_order_id: NULL
          buy_amount: 0.00002
           buy_price: 52373.99
sell_client_order_id: NULL
       sell_order_id: NULL
         sell_amount: 0.00002
          sell_price: 54992.69
                note: NULL
                meta: {"error":"Kobens\\Http\\Exception\\Status\\ServerError\\GatewayTimeoutException::Server Error"}
          updated_at: 2021-05-10 21:39:20