Images have disappeared from gallery, but still in "My Files" (Samsung Galaxy S6 Edge, 5.0.2)
Updated answer:
Check if you have a hidden file named .nomedia (double check also for uppercase name) on device memory (storage folder) and delete.
Go to Settings &gt; Apps -&gt; ALL -&lt; Media Storage. Select Clear data + Clear defaults. Disable the App.
Reboot the device. Now enable again Settings &gt; Apps -&gt; ALL -&lt; Media Storage. Wait a couple of minutes (so it should reindex files). I think all files should be now again in Gallery.
Note:  Do not try to run any rescan App, just follow the above steps.
Old answer:
The error you got in logcat is related to a specific function for processing/scaling up images. It is a known fact: Binder transaction buffer has limited and fixed memory (1MB). This buffer is used by all transactions and shared across process. For e.g., If you have a big number of large images files and some of them are corrupted  (either by poor, bad transfer via computer and device, computer and SD card, and so on), or some of them are not recognized by your app (in your case Gallery), once this app tries to create thumbnails or previews for your files and actually scale down/up one of those files, the process may fail.
The same case must be with a number of files (like ringtones or .wav diles, or .ogg, or any type of music) which have problems either in content, size, signature.
Because you said the problem comes back, I suspect this kind of strange behavior from your apps. I don't even think to a bug in kernel or something like this.
So, for your own safety:

Try to put back all those files on your pc;
Clear from SD card/phone memory;
Verify in PC for the 'bad' files, then put back 'correct' files in your device.

Take in consideration this fact also: a .gif, .jpg, .png or whatever kind of image you have, may be rendered as 'correct' in your computer or device, but actually may have 'bad' content (disrupted content). Remember, all operation related to process images inside your Android device are based on compress/decompress them  (for the most common operations) and those are made 'bit-by-bit' if I can say so. Forcing an app to render incorrect type or content (wrong height/width/file lenght) should outcast a TransactionTooLargeException (this is what MediaScanner throws in logcat).