Edge length larger than maximum allowed on Linux but not on Windows?

So I built a nice little web service with minimal frontend to build a jira ticket dependency graph because I was losing track of all the linked tickets. The problem: with a bigger graph, when deployed on Linux, I just get an error message like

Error: Edge length 86255.322266 larger than maximum 65535 allowed.
Check for overwide node(s).
Error: Edge length 617528.307373 larger than maximum 65535 allowed.
Check for overwide node(s).

Can I somehow raise that limit? Use a different distribution (I’m currently using alpine3.18)? Lower…things like fontsize/nodesize/edgelength over a certain number of nodes (i.e. jira tickets)? Or do I have to find a cheap way to host this thing on windows?

I believe those units are points, the shorter edge would be ~1200 inches!! The larger would be wow!
(Just how big is you monitor?)

  1. Sometimes graphs can get very non-rectangular. There are ways to try to “fix” that.
  2. Can you share some or all of the smaller graph?

Good morning, I put some censoring on the graph as I’m not sure I may share this publicly, but anything beside the actual node names and summaries is the same, even length-wise. It’s not actually that big a graph either (at least not for graphs I think. It is quite big for jira issues):

digraph G {
	node [shape=box];
	rankdir=LR;
	"JI-41529" [label="JI-41529\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-41529"; style=filled; fillcolor=green];
	"JI-42130" [label="JI-42130\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-42130"; style=filled; fillcolor=green];
	"JI-42861" [label="JI-42861\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-42861"; style=filled; fillcolor=white];
	"JI-43284" [label="JI-43284\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-43284"; style=filled; fillcolor=green];
	"JO-36021" [label="JO-36021\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JO-36021"; style=filled; fillcolor=white];
	"JA-3343" [label="JA-3343\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JA-3343"; style=filled; fillcolor=green];
	"JI-43124" [label="JI-43124\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-43124"; style=filled; fillcolor=green];
	"JI-43515" [label="JI-43515\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-43515"; style=filled; fillcolor=white];
	"JI-23448" [label="JI-23448\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-23448"; style=filled; fillcolor=white];
	"JI-22174" [label="JI-22174\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-22174"; style=filled; fillcolor=white];
	"JA-2577" [label="JA-2577\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JA-2577"; style=filled; fillcolor=yellow];
	"JI-43763" [label="JI-43763\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-43763"; style=filled; fillcolor=white];
	"JO-36604" [label="JO-36604\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JO-36604"; style=filled; fillcolor=white];
	"JI-43840" [label="JI-43840\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-43840"; style=filled; fillcolor=white];
	"JI-31066" [label="JI-31066\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-31066"; style=filled; fillcolor=green];
	"LVM-2346" [label="LVM-2346\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/LVM-2346"; style=filled; fillcolor=green];
	"JA-2839" [label="JA-2839\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JA-2839"; style=filled; fillcolor=green];
	"GON-4201" [label="GON-4201\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/GON-4201"; style=filled; fillcolor=green];
	"MEI-507" [label="MEI-507\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/MEI-507"; style=filled; fillcolor=green];
	"JO-25049" [label="JO-25049\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JO-25049"; style=filled; fillcolor=white];
	"GON-1988" [label="GON-1988\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/GON-1988"; style=filled; fillcolor=green];
	"DOM-19" [label="DOM-19\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/DOM-19"; style=filled; fillcolor=white];
	"JI-42870" [label="JI-42870\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-42870"; style=filled; fillcolor=white];
	"JO-35046" [label="JO-35046\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JO-35046"; style=filled; fillcolor=white];
	"JO-34461" [label="JO-34461\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JO-34461"; style=filled; fillcolor=white];
	"JO-35261" [label="JO-35261\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JO-35261"; style=filled; fillcolor=white];
	"JI-43872" [label="JI-43872\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-43872"; style=filled; fillcolor=yellow];
	"JI-41529" -> "JI-42130" [label="is cloned by"];
	"JI-42130" -> "JI-42861" [label="wird benötigt von"];
	"JI-42861" -> "JI-42130" [label="benötigt"];
	"JI-42861" -> "JI-43284" [label="wird benötigt von"];
	"JI-43284" -> "JO-36021" [label="benötigt"];
	"JO-36021" -> "JI-43284" [label="wird benötigt von"];
	"JI-43284" -> "JI-42861" [label="benötigt"];
	"JI-43284" -> "JA-3343" [label="clones"];
	"JA-3343" -> "JI-43284" [label="is cloned by"];
	"JI-43284" -> "JI-43124" [label="verknüpft"];
	"JI-43124" -> "JI-43284" [label="ist verknüpft von"];
	"JI-42861" -> "JI-43515" [label="wird benötigt von"];
	"JI-43515" -> "JI-23448" [label="benötigt"];
	"JI-23448" -> "JI-22174" [label="wird benötigt von"];
	"JI-22174" -> "JI-23448" [label="benötigt"];
	"JI-22174" -> "JA-2577" [label="wird benötigt von"];
	"JA-2577" -> "JI-22174" [label="benötigt"];
	"JA-2577" -> "JI-43515" [label="benötigt"];
	"JA-2577" -> "JI-43763" [label="benötigt"];
	"JI-43763" -> "JO-36604" [label="benötigt"];
	"JO-36604" -> "JI-43763" [label="wird benötigt von"];
	"JI-43763" -> "JI-23448" [label="benötigt"];
	"JI-43763" -> "JI-42861" [label="benötigt"];
	"JI-43763" -> "JA-2577" [label="wird benötigt von"];
	"JI-43763" -> "JI-43515" [label="clones"];
	"JI-43763" -> "JI-43840" [label="parent of"];
	"JI-43840" -> "JI-43763" [label="child of"];
	"JI-43840" -> "JI-22174" [label="ist verknüpft von"];
	"JI-43763" -> "JI-23448" [label="verknüpft"];
	"JI-43763" -> "JI-42861" [label="verknüpft"];
	"JI-43763" -> "JI-31066" [label="verknüpft"];
	"JI-31066" -> "LVM-2346" [label="benötigt"];
	"LVM-2346" -> "JI-31066" [label="wird benötigt von"];
	"LVM-2346" -> "JA-2839" [label="wird benötigt von"];
	"JA-2839" -> "LVM-2346" [label="benötigt"];
	"JA-2839" -> "JI-31066" [label="benötigt"];
	"LVM-2346" -> "GON-4201" [label="wird benötigt von"];
	"GON-4201" -> "LVM-2346" [label="benötigt"];
	"GON-4201" -> "JI-31066" [label="wird benötigt von"];
	"GON-4201" -> "MEI-507" [label="verknüpft"];
	"MEI-507" -> "GON-4201" [label="ist verknüpft von"];
	"JI-31066" -> "GON-4201" [label="benötigt"];
	"JI-31066" -> "JA-2839" [label="wird benötigt von"];
	"JI-31066" -> "JO-25049" [label="wird blockiert durch"];
	"JO-25049" -> "JI-31066" [label="blockiert"];
	"JI-31066" -> "JI-22174" [label="ist verknüpft von"];
	"JI-31066" -> "JI-43515" [label="ist verknüpft von"];
	"JI-31066" -> "JI-43763" [label="ist verknüpft von"];
	"JI-43763" -> "GON-1988" [label="verknüpft"];
	"GON-1988" -> "JI-22174" [label="ist verknüpft von"];
	"GON-1988" -> "JI-43515" [label="ist verknüpft von"];
	"GON-1988" -> "JI-43763" [label="ist verknüpft von"];
	"JI-22174" -> "JI-43515" [label="is cloned by"];
	"JI-22174" -> "DOM-19" [label="is cloned by"];
	"DOM-19" -> "JI-23448" [label="benötigt"];
	"DOM-19" -> "JI-22174" [label="clones"];
	"JI-22174" -> "JI-23448" [label="verknüpft"];
	"JI-22174" -> "JI-43840" [label="verknüpft"];
	"JI-22174" -> "JI-42861" [label="verknüpft"];
	"JI-22174" -> "JI-31066" [label="verknüpft"];
	"JI-22174" -> "GON-1988" [label="verknüpft"];
	"JI-23448" -> "JI-43515" [label="wird benötigt von"];
	"JI-23448" -> "JI-43763" [label="wird benötigt von"];
	"JI-23448" -> "DOM-19" [label="wird benötigt von"];
	"JI-23448" -> "JI-22174" [label="ist verknüpft von"];
	"JI-23448" -> "JI-43515" [label="ist verknüpft von"];
	"JI-23448" -> "JI-43763" [label="ist verknüpft von"];
	"JI-43515" -> "JI-42861" [label="benötigt"];
	"JI-43515" -> "JA-2577" [label="wird benötigt von"];
	"JI-43515" -> "JI-22174" [label="clones"];
	"JI-43515" -> "JI-43763" [label="is cloned by"];
	"JI-43515" -> "JI-23448" [label="verknüpft"];
	"JI-43515" -> "JI-42861" [label="verknüpft"];
	"JI-43515" -> "JI-31066" [label="verknüpft"];
	"JI-43515" -> "GON-1988" [label="verknüpft"];
	"JI-42861" -> "JI-43763" [label="wird benötigt von"];
	"JI-42861" -> "JI-42870" [label="parent of"];
	"JI-42870" -> "JO-35046" [label="benötigt"];
	"JO-35046" -> "JI-42870" [label="wird benötigt von"];
	"JO-35046" -> "JO-34461" [label="clones"];
	"JO-34461" -> "JO-35046" [label="is cloned by"];
	"JO-35046" -> "JO-35261" [label="is cloned by"];
	"JO-35261" -> "JO-35046" [label="clones"];
	"JO-35046" -> "JI-42861" [label="verknüpft"];
	"JI-42870" -> "JI-42861" [label="child of"];
	"JI-42861" -> "JO-35046" [label="ist verknüpft von"];
	"JI-42861" -> "JI-22174" [label="ist verknüpft von"];
	"JI-42861" -> "JI-43515" [label="ist verknüpft von"];
	"JI-42861" -> "JI-43763" [label="ist verknüpft von"];
	"JI-42130" -> "JI-41529" [label="clones"];
	"JI-42130" -> "JI-43872" [label="parent of"];
	"JI-43872" -> "JI-42130" [label="child of"];
}

This easily works on my Windows computer (I have a 34" ultra wide screen, and a 27" full hd wide screen, if that matters), but does not work when ran through dot running on a Linux server.

Uploading it doesn’t seem to work so I stored the resulting svg file there: Home · Wiki · Marlon Regenhardt / JiraGraph.NET · GitLab

I’d say it’s big but not THAT big.

Turns out this even happens with smaller graphs like

digraph G {
	node [shape=box];
	rankdir=LR;
	"JI-41868" [label="JI-41868\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-41868"; style=filled; fillcolor=white];
	"JI-37097" [label="JI-37097\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-37097"; style=filled; fillcolor=green];
	"JI-36281" [label="JI-36281\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-36281"; style=filled; fillcolor=green];
	"JI-35559" [label="JI-35559\nLorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy "; href="https://my.jira.instance/browse/JI-35559"; style=filled; fillcolor=green];
	"JI-41868" -> "JI-37097" [label="clones"];
	"JI-37097" -> "JI-36281" [label="clones"];
	"JI-36281" -> "JI-35559" [label="clones"];
	"JI-35559" -> "JI-36281" [label="is cloned by"];
	"JI-36281" -> "JI-37097" [label="is cloned by"];
	"JI-37097" -> "JI-41868" [label="is cloned by"];
}

I’m not telling it to use a specific edge length anywhere and I’m trying to build an SVG, not sure why the edge length can be at all a problem here. SVG is relative to viewport and should be easy to build?

Quite legal, but very non-rectangular. Lots of very wide nodes plus wide-ish edge labels. Some suggestions:

  • change to rankdir=TB. Yes it changes the look, but this is the easiest way to have a very large impact. (Note that some of the edges may be less attractive (wavy)).
  • if possible, add more newlines to the node labels (to reduce label width). If you are brave, you might look at this: Text wrapping in Graphviz? - #4 by ronman
  • alternatively, consider structuring the label text into record or html format to reduce label width (Node Shapes | Graphviz)
  • use the unflatten program (https://graphviz.org/pdf/unflatten.1.pdf) to try to make the graph more rectangular
  • reduce fontsize (simple, but not a huge impact)

This restriction seems to only exist because the minlen field is an unsigned short. It can probably easily be lifted. raise minlen restriction (#2413) · Issues · graphviz / graphviz · GitLab.

Isn’t a short always 2 Bytes, even on Windows? I’m just a C# dev so this is not usually something I think about but if possible I’d like to understand why it works on windows when it, if I understand this correctly, shouldn’t.

Yes, I believe a short is still 2 bytes there. Various parts of Graphviz’ layout algorithms are more accurate on Linux. In particular, the libgts triangulation library can help Graphviz do better layout and efforts so far to enable it on Windows have been unsuccessful. If I was to guess what is happening, a run on Windows is performing a less accurate layout which coincidentally happens to fall within the bounds of a unsigned short.

Is there some trick to repro this? I began trying to implement this by first constructing a test case that represents the problem, add a test case of a graph with large edge lengths (a084199a) · Commits · Matthew Fernandez / graphviz · GitLab. However it passes on all platforms, Pipeline · Matthew Fernandez / graphviz · GitLab

This is like that tweet showing how PDF handles layouts as large as a small country in Europe. It’s good for programs to be as flexible and as consistent as reasonably possible, and I never want to argue that edges longer than 24 meters can not be useful.

I can’t reproduce it on Ubuntu (7.0.7~dev.20230106.0633 (20230106.0633) or 2.43.0 (0))

Can you spot what I’ve done wrong? My test case was intended to fail, but it passes everywhere including Ubuntu.

I can’t reproduce it either.

Maybe it’s indeed about the specific distro, I’m using alpine: JiraTools.Web.Api/Dockerfile · master · Marlon Regenhardt / JiraGraph.NET · GitLab

Ah, sorry, misread this.

It’s not really feasible for us to add another distro to CI (it is already more than a full time job just keeping the existing jobs green). I guess we’ll have to go ahead and make this change speculatively.

I’ll gladly test it in my application if I figure out how to get it into my docker container :slight_smile:

Edit: Oh or will automatically be updated in the apk repository anyway?

Thanks!

I don’t know. You’ll have to ask Natanel Copa, the Alpine maintainer.