It looks like there is a limit on the size of the string to be encrypted: about 50 characters.
This is due to the fact that the implementation allocates an output buffer of size EVP_PKEY_size(pkey), which is totally arbitrary and unrelated to the size of the input. Also, it's not using a cipher envelope approach. It's just RSAing the input string.