natewallis
Hi,
I have an application which I have deployed to my server using distillery and the application that is a temporary application to store orders that are made to our business. I am providing a front end for sales staff to enter new orders that are placed with our business. When a small subset of orders is requested, all is working ok, but when all orders are requested (probably about 2000 orders), the application dies and I just see “Killed” on the screen.
I haven’t implemented pagination on the front end purely because this application will be shut down soon when our new CRM is up and running…
10:47:02.313 request_id=2np7ro3uojb3ei86l0000071 [info] GET /orders
Killed
I also see this in the mysql error log when /orders is requested
2020-02-11T23:47:02.692870Z 1863 [Note] Aborted connection 1863 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692874Z 1862 [Note] Aborted connection 1862 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692864Z 1859 [Note] Aborted connection 1859 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692877Z 1865 [Note] Aborted connection 1865 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692882Z 1864 [Note] Aborted connection 1864 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692885Z 1860 [Note] Aborted connection 1860 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692889Z 1866 [Note] Aborted connection 1866 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692893Z 1858 [Note] Aborted connection 1858 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692822Z 1867 [Note] Aborted connection 1867 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
2020-02-11T23:47:02.692897Z 1861 [Note] Aborted connection 1861 to db: 'interim_crm_prod' user: 'root' host: 'localhost' (Got an error reading communication packets)
NGINX logs say this:
2020/02/12 10:47:02 [error] 7236#7236: *45826 upstream prematurely closed connection while reading response header from upstream, client: 203.7.6.188, server: crm.bar-fridges-australia.com.au, request: "GET /orders?search= HTTP/1.1", upstream: "http://127.0.0.1:4000/orders?search=", host: "crm.bar-fridges-australia.com.au", referrer: "https://crm.bar-fridges-australia.com.au/orders?start_date=2019-10-01&end_date=2019-12-31"
Does anyone have any other debugging ideas that I can use?
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
I’ve followed the Phoenix LiveView file upload code here Uploads — Phoenix LiveView v1.0.0-rc.7 and so far everything works just fine wit...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
Latest Phoenix Threads
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #ai
- #iex
- #graphql
- #elixirconf-us
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 3- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
benwilson512
Hi @natewallis are you storing orders in memory? Is your application using too much memory and being killed by the system?
natewallis
Hi Ben, yes, I guess they would be stored in memory when rendering to HTML…
I think pagination will probably be the best solution..
wanton7
Googled a bit and “Killed” does really sound like you are running out of memory.
Your system must not have swap file enabled. But not sure why would just 2000 orders take so much memory to kill your system. You machine must be really close to its memory limit before that request. I would check available memory before request. Maybe your system has low amount of memory to begin with or maybe your app already uses lot of memory before that crashing request. If it’s latter, your should profile your memory usage to see what uses it.