For length I can't remember exactly sure, you can always extend the wires with a crimp connection and another wire if needed, not for them not working the only reason I can think of is the diode is facing the wrong direction. If you have a volt meter check the diodes to see what ay they flow. When you go to install them make sure the current flows from the high beam relay to the low/fog/daytime running or as many you are doing.
Hope this helps.

the different numbers for the diodes manly represent different lengths, and I don't remember which ones I used.