IMAGINARY / imaginary-web

Imaginary website (Drupal 7)
GNU General Public License v2.0
3 stars 0 forks source link

http://imaginary.org/projects disfunctional? #111

Closed andreasdanielmatt closed 8 years ago

andreasdanielmatt commented 8 years ago

The page http://imaginary.org/projects does not load (even if the rest of the site is working). It is linked from the small main menu on top of the imaginary.org page. Could you please check? (maybe it is related to our other server issues?)

elondaits commented 8 years ago

The problem was the Typogrify 3rd party module, which I had to update recently due to problems in its unicode support. The "widow removal" function is running for a VERY long time (it's a regexp, so I assume it's not infinite... but it's probably backtracking like crazy).

This was almost certainly yesterday's problem (high CPU, no disk or database access). I'm not sure it was the cause for the previous outages which were low-cpu, high disk (I was logged in and didn't see processes locked at 100% cpu like with this bug) although it could be somehow related.

I disabled the widow removal functionality so the page is accesible again. I'll see if I can find what the problem was, exactly.

andreasdanielmatt commented 8 years ago

ok, perfect. It seems that we are finding some of the "bad guys" causing troubles.

elondaits commented 8 years ago

What I found:

elondaits commented 8 years ago

Fixed in f97538a67f26b4f913ffedd3f5daa048e31e019c

andreasdanielmatt commented 8 years ago

Just to understand: how does the 75k image get into the description text? (it was included with the "insert image" option of the html-text-menu? Or somewhere else?). I am just wondering, if this could happen also in other occasions? (and we should let our editors know, not to do that).

elondaits commented 8 years ago

The image was converted into base64, which is a scheme that lets you convert a binary file into a text representation that uses only letters and numbers (it's the way in which images and other binaries were transferred through text-only media in the past, such as usenet, text terminals, etc.)

Once you have the image in base64 you can put it in the src attribute of an img HTML element instead of an URL:

<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />

That's the way it was loaded. I don't know if one of the tools in the editor facilitates it, if it was brought in through copy+paste or how. It's not the greatest idea in the world because it gets binary images in the database instead of storing them as files.