Max between waypoints is 2000 meters.
Max total length of mission for all waypoints is 10,000 meters, limited by P3 firmware the last I tested it. That may have changed since then or be different for P4.
If you have set end of mission as "Return to Waypoint 1" the last waypoint must be...