diff --git a/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Hidden-Mobile-1-chromium-linux.png b/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Hidden-Mobile-1-chromium-linux.png index ab79c58ee2eaf..0e709cd227beb 100644 Binary files a/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Hidden-Mobile-1-chromium-linux.png and b/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Hidden-Mobile-1-chromium-linux.png differ diff --git a/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Shown-Mobile-1-chromium-linux.png b/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Shown-Mobile-1-chromium-linux.png index 55ea6ef92745b..2ce1d7971c1e1 100644 Binary files a/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Shown-Mobile-1-chromium-linux.png and b/playwright/e2e-vrt/layout/Navigation.spec.ts-snapshots/Navigation-App-Page-With-Side-Bar-Shown-Mobile-1-chromium-linux.png differ diff --git a/plugin-server/src/config/config.ts b/plugin-server/src/config/config.ts index 4f3856af385b7..e0d9e3c49ad13 100644 --- a/plugin-server/src/config/config.ts +++ b/plugin-server/src/config/config.ts @@ -116,6 +116,7 @@ export function getDefaultConfig(): PluginsServerConfig { OBJECT_STORAGE_SECRET_ACCESS_KEY: 'object_storage_root_password', OBJECT_STORAGE_BUCKET: 'posthog', PLUGIN_SERVER_MODE: null, + PLUGIN_LOAD_SEQUENTIALLY: false, KAFKAJS_LOG_LEVEL: 'WARN', HISTORICAL_EXPORTS_ENABLED: true, HISTORICAL_EXPORTS_MAX_RETRY_COUNT: 15, diff --git a/plugin-server/src/types.ts b/plugin-server/src/types.ts index 5cd069484b2d3..a6bd8fe69ce17 100644 --- a/plugin-server/src/types.ts +++ b/plugin-server/src/types.ts @@ -188,6 +188,7 @@ export interface PluginsServerConfig { OBJECT_STORAGE_SECRET_ACCESS_KEY: string OBJECT_STORAGE_BUCKET: string // the object storage bucket name PLUGIN_SERVER_MODE: PluginServerMode | null + PLUGIN_LOAD_SEQUENTIALLY: boolean // could help with reducing memory usage spikes on startup KAFKAJS_LOG_LEVEL: 'NOTHING' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' HISTORICAL_EXPORTS_ENABLED: boolean // enables historical exports for export apps HISTORICAL_EXPORTS_MAX_RETRY_COUNT: number diff --git a/plugin-server/src/worker/plugins/setup.ts b/plugin-server/src/worker/plugins/setup.ts index 2ff72c9a899aa..4d2d2e33e8807 100644 --- a/plugin-server/src/worker/plugins/setup.ts +++ b/plugin-server/src/worker/plugins/setup.ts @@ -26,8 +26,11 @@ export async function setupPlugins(hub: Hub): Promise { pluginConfig.vm = statelessVms[plugin.id] } else { pluginConfig.vm = new LazyPluginVM(hub, pluginConfig) - pluginVMLoadPromises.push(loadPlugin(hub, pluginConfig)) - + if (hub.PLUGIN_LOAD_SEQUENTIALLY) { + await loadPlugin(hub, pluginConfig) + } else { + pluginVMLoadPromises.push(loadPlugin(hub, pluginConfig)) + } if (prevConfig) { void teardownPlugins(hub, prevConfig) }