Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TradeRepeater\Seller - GatewayTimeoutException #218

Open
dfelton opened this issue Jul 22, 2021 · 1 comment
Open

TradeRepeater\Seller - GatewayTimeoutException #218

dfelton opened this issue Jul 22, 2021 · 1 comment
Labels
bug Something isn't working Priority - Medium

Comments

@dfelton
Copy link
Owner

dfelton commented Jul 22, 2021

Shutdown Enabled at: 2021-07-19 18:50: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/Seller.php(151): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderPlacement\NewOrder\ForceMaker->place(Object(Kobens\Gemini\Exchange\Currency\Pair), 'sell', 'REDACTED', 'REDACTED', 'REDACTED')
#3 src/Command/Command/TradeRepeater/Seller.php(120): Kobens\Gemini\Command\Command\TradeRepeater\Seller->place(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Kobens\Gemini\TradeRepeater\Model\Trade), 'REDACTED')
#4 src/Command/Command/TradeRepeater/Seller.php(94): Kobens\Gemini\Command\Command\TradeRepeater\Seller->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\Seller->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\Seller), 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(445): 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/Seller.php(151): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderPlacement\NewOrder\ForceMaker->place(Object(Kobens\Gemini\Exchange\Currency\Pair), 'sell', 'REDACTED', 'REDACTED', 'REDACTED')
#3 src/Command/Command/TradeRepeater/Seller.php(120): Kobens\Gemini\Command\Command\TradeRepeater\Seller->place(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Kobens\Gemini\TradeRepeater\Model\Trade), 'REDACTED')
#4 src/Command/Command/TradeRepeater/Seller.php(94): Kobens\Gemini\Command\Command\TradeRepeater\Seller->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\Seller->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\Seller), 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(445): Symfony\Component\Console\Application->run()
#10 {main}
@dfelton
Copy link
Owner Author

dfelton commented Sep 15, 2021

Occurred again just now, confirmed record that was now stuck in a SELL_SENT status DID successfully get placed. Manual resolution via:

  • Examine stack trace to extract trade_repeater.id value of problem record
  • Query exchange for order status via client_order_id
  • Manually update trade_repeater record: update trade_repeater set meta = "{\"buy_price\":\"123\",\"sell_price\":\"456\"}", is_error = 0, sell_order_id = 1234567890, status = "SELL_PLACED" where id = 12345
  • Remove var/emergency_shutdown file
  • Restart trade repeater

@dfelton dfelton added bug Something isn't working Priority - Medium labels Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority - Medium
Projects
None yet
Development

No branches or pull requests

1 participant