weixin_39881958
weixin_39881958
2020-12-01 21:44

Question: what happens if there is more than one erlang_ls executable?

What happens to mnesia if we have more than one instance of erlang_ls running at the same time?

e.g. If I have one emacs session running against one project, and a different one against another project.

该提问来源于开源项目:erlang-ls/erlang_ls

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39744606 weixin_39744606 5月前

    Sometimes if I git pull the latest code, and build it again, I have to delete mnesia files in cache directory to ensure the erlang_ls work.

    点赞 评论 复制链接分享
  • weixin_39875805 weixin_39875805 5月前

    This is probably related to #318. Right now, if the DB schema for a given project already exists, it is not re-created by the installation script. So, if the new version of the server requires a slightly different schema, things will break unless you (as you already figured out) wipe out the cache. This will be fixed soon.

    Of course, we should confirm this is the case for you. So, if this happens again, please try to start the server in debug mode (see the README for details) and feel free to attach a copy of the startup logs.

    点赞 评论 复制链接分享
  • weixin_39799290 weixin_39799290 5月前

    Are you getting any error messages or is it that erlang_ls is unresponsive. Could it be that the DB initialization when there is already one created is taking so long that for the user it just looks like nothing works?

    点赞 评论 复制链接分享
  • weixin_39875805 weixin_39875805 5月前

    We would need more context/logs to be able to proceed with the investigation.

    点赞 评论 复制链接分享
  • weixin_39875805 weixin_39875805 5月前

    I'm closing this one in favour of #318 and #418. If you feel something from this issue is not covered by those two, please re-open.

    点赞 评论 复制链接分享
  • weixin_39799290 weixin_39799290 5月前

    The mnesia instance is different for each project, so they don't conflict with one another.

    If you start erlang_ls with the same project twice, they will probably conflict with each other.

    点赞 评论 复制链接分享