sahilpaudel

sahilpaudel

PID contributing 97% in the response time/API timeouts

While checking my API metrics in new relic and found queries are getting executed with response time in a few ms, but there is a field for #PID<0.30881.849> which took 300ms+ to process.

Below is the table

Category Slowest components Count Duration %
#PID<0.30881.849> #PID<0.30881.849> 1 379 ms 97%
Database Postgres rules_engine_test_cases select 1 2 ms 1%
Database Postgres rules_engine_conditions select 1 1 ms 0%
Database Postgres rules_engine_results select 1 1 ms 0%
Database Postgres rules_engine_new_audit_logs insert 1 1 ms 0%
WebTransaction /Diamond.Web.RuleSetController/select_evaluate 1 0 ms 0%
Remainder Remainder 1 7 ms 2%
Total time 391 ms 100%

Can you please help me understand this as it is causing few timeouts as well?

Most Liked

wanton7

wanton7

Reason why you are not getting almost any answers is that what you are asking is basically someone else to do your work for you. Also they can’t give you any answers because they don’t have access to your code and if they did they would have to what you need to do and that is to find out what part of your code is slow. If someone asked something like that from you would you be able to answer?

I don’t work with Elixir professionally but first thing I would do is to find out what parameters where given to the request. Then try to get same problem appear in your local environment and start profiling. I haven’t yet used any Elixir/BEAM profiling tools because I haven’t had any performance problems with my small projects. With small bit of googling I found this blog how to do performance profiling in Elixir An Elixir performance tooling story | by Victor Nascimento | Medium

Where Next?

Popular in Questions Top

bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 record...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
makeitrein
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project. Baby step #1 is extracting the number ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New

Other popular topics Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New

We're in Beta

About us Mission Statement