Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not start a Mill server process - unused worker folders on different java versions #1895

Closed
james-s-w-clark opened this issue Jun 10, 2022 · 1 comment

Comments

@james-s-w-clark
Copy link
Contributor

james-s-w-clark commented Jun 10, 2022

Foreword

I don't expect this issue to be fixed - it could even be closed straight away. My goal is to have Google index some of the keywords so anyone searching for the error can see the problem and a workaround.

Logs

mill --version
Could not start a Mill server process.
This could be caused by too many already running Mill instances or by an unsupported platform.

Trying to run Mill in-process ...
WARNING: Starting a build REPL without --repl is deprecated

I've these logs for a while. I don't think it's causing problems, but it makes a bit of clutter and I found out the problem and a workaround.

Problem

in the /out subdirectory of a project, I see multiple worker folders:

mill-worker-4NgIq8oPOZ0Pt8mqxMVCbDtyWrA=-1
mill-worker-4NgIq8oPOZ0Pt8mqxMVCbDtyWrA=-2
mill-worker-4NgIq8oPOZ0Pt8mqxMVCbDtyWrA=-3
mill-worker-az+jTtPVXk241KvClsS4VnpVBIw=-1
mill-worker-az+jTtPVXk241KvClsS4VnpVBIw=-2

There is a mix of JVM versions used, hence the different names.
The max count is hard-coded, and I think mill can't reuse worker folders that have different JVM verisons. They still count towards the max count of parallel mill server instances however.

You could reproduce this by running 5 mill tasks simultaneously, changing to a different versions of JVM, and then running some more mill tasks.

Workaround

For each folder where the mill version doesn't match your current JVM version, delete the folder (or just delete them all, bit simpler). Mill will make new ones with the right versions and such.

Further notes

Maybe mill shouldn't count worker folders that use non-current JVM versions (or should remove them on clean?).
I thought it's worth getting this information indexed though, as it seems fairly probably people will upgrade mill whilst working on the same project(s) and thus might come across these logs.

@james-s-w-clark james-s-w-clark changed the title Could not start a Mill server process - unused worker folders on different mill versions Could not start a Mill server process - unused worker folders on different JVM versions Jun 13, 2022
@james-s-w-clark james-s-w-clark changed the title Could not start a Mill server process - unused worker folders on different JVM versions Could not start a Mill server process - unused worker folders on different JVM/mill versions Jun 13, 2022
@james-s-w-clark james-s-w-clark changed the title Could not start a Mill server process - unused worker folders on different JVM/mill versions Could not start a Mill server process - unused worker folders on different mill versions Jun 13, 2022
@james-s-w-clark james-s-w-clark changed the title Could not start a Mill server process - unused worker folders on different mill versions Could not start a Mill server process - unused worker folders on different java versions Jun 13, 2022
@james-s-w-clark
Copy link
Contributor Author

Double checked, it's JVM changes that lead to the issue. Mill versions aren't the issue.
With JVM upgrades being more frequent now, this might be a bit more important.

@com-lihaoyi com-lihaoyi locked and limited conversation to collaborators Nov 22, 2022
@lefou lefou converted this issue into discussion #2134 Nov 22, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant