Skip to content
This repository was archived by the owner on Nov 4, 2021. It is now read-only.
This repository was archived by the owner on Nov 4, 2021. It is now read-only.

Console.log slow query warning #424

@mariusandra

Description

@mariusandra

When developing locally (with postgres), I see stuff like this in the logs way too often:

⌛⌛⌛ Postgres slow query warning after 30 sec {
  queryTextOrConfig: 'INSERT INTO posthog_pluginlogentry (id, team_id, plugin_id, plugin_config_id, timestamp, source,type, message, instance_id) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)',
  values: [
    '01799986-7949-0000-cccc-a3047fc031c1',
    1,
    3,
    10,
    '2021-05-23 13:59:57.513',
    'CONSOLE',
    'LOG',
    'retrying job!',
    '01799986-30dc-0000-cf62-e49fee9f4eff'
  ]
}
[___2] 16:07:49 🤮 Unhandled Promise Error!

The unhandled promise error is from here, and the "retrying job!" message was logged from within a simple plugin:

export const jobs = {
    processEvent (event, meta) {
        console.log('retrying job!')
    }
}
export function processEvent (event, { jobs }) {
    console.log('in processEvent')
    jobs.processEvent(event).runIn(3, 'seconds')
    return event
}

I think it got worse with plugin jobs, but that might be a red herring. Possibly with just plugin logs? The console.log line in the plugins is not await-ed obviously, so perhaps that has something to do with it?

This happens often enough, but is hard to replicate reliably. Anyone have any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions