Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ describe('publish luis files', () => {
crossTrainConfig: {},
luFiles: [],
},
setTimeout: (msecs: number, callback: () => any): void => {},
} as Request;
await ProjectController.build(mockReq, mockRes);
expect(mockRes.status).toHaveBeenCalled();
Expand Down
5 changes: 5 additions & 0 deletions Composer/packages/server/src/controllers/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,11 @@ async function build(req: Request, res: Response) {
const projectId = req.params.projectId;
const user = await ExtensionContext.getUserFromRequest(req);

// Disable Express' built in 2 minute timeout for requests. Otherwise, large models may fail to build.
req.setTimeout(0, () => {
throw new Error('LUIS publish process timed out.');
});

const currentProject = await BotProjectService.getProjectById(projectId, user);
if (currentProject !== undefined) {
try {
Expand Down