It seems to happen every year now when I start getting into the long rides: somewhere in the middle of nowhere I feel a sudden urge to pee. I find the nearest suitable spot but very little comes. Five miles later the urge strikes again, and repeat to the end of the ride.
What are the possible causes, and what can I do about them?
This would be, for me, will be the start of cystitis. Your bladder is overacting, this can be due to a number of irritants.
I have diverticula in my bladder which are therefore prone to infection and I get cystitis symptoms before there are enough causal organisms to show in a test.
1) drink more- how much are you drinking now? How hard are you pushing? How much are you sweating? Never ignore thirst, but don't drink obsessively, that won't help at all
2) avoid caffeine, alcohol, highly acidic or very sweet drinks, especially when exercising
3) don't always pee when you think you need to go. (I know! but trust me, this is necessary)
4) check you're not doing anything that might trigger urethritis - personal hygiene, clean shorts, saddle angle, perineal pressure
I'd also see your GP to rule out anything else.