Mathjax site (and CDN) down?

104 views
Skip to first unread message

Hadley Wickham

unread,
Mar 13, 2012, 10:51:14 AM3/13/12
to MathJax Users
Since early this morning. Anyone else seeing the same problem?

Hadley

Davide P. Cervone

unread,
Mar 13, 2012, 10:53:14 AM3/13/12
to mathja...@googlegroups.com
Yes, we are experiencing problems and are working on them as we
speak. We hope to have a work-around soon. So sorry for the
inconvenience to you and your users. We will post more here when we
have something worked out.

Davide

Davide P. Cervone

unread,
Mar 13, 2012, 11:29:01 AM3/13/12
to mathja...@googlegroups.com
As a temporary work-around, you can use

http://s3.amazonaws.com/mathjax/latest/MathJax.js

for now to access MathJax. This will at least get your site up and
running until we straighten out the problem with the CDN.

Davide


On Mar 13, 2012, at 10:51 AM, Hadley Wickham wrote:

Peter Krautzberger

unread,
Mar 13, 2012, 12:24:47 PM3/13/12
to mathja...@googlegroups.com
The DNS changes are coming through. You should be able to use the CDN again, soon.

Again, we're very sorry for the inconvenience to you and your users!

Mike Pearson

unread,
Mar 14, 2012, 5:24:12 AM3/14/12
to mathja...@googlegroups.com
Davide, Peter,

Good to see MathJAX returning after the DNS glitch yesterday. Thanks for all the restorative work.

One heartening thing was that we had quite a few error reports from our http://nrich.maths.org users. We have users :)

A couple of things that I'd like to do to make things fallback more gracefully which maybe you can help us with - I'm sure others will have similar needs:

1) We saw some machines replacing the greyed out source TeX with bright red error messages. This I think is new to MathJAX v2. Our users can often make sense of the source TeX, but the red error message obliterates the maths content completely. Is there a way to disable this message?

2) Any thoughts on how to implement a local fallback? We saw a suggestion from Simon Woodhead on this yesterday which looks promising.

> <!-- MathJax: Fall back to local if CDN offline but local image fonts are not supported (saves >100MB) -->
> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
> <script>window.MathJax || document.write('<script type="text/x-mathjax-config">MathJax.Hub.Config({"HTML-CSS":{imageFont:null}});<\/script><script src="<<PATH_TO_YOUR_LOCAL_MATHJAX>>MathJax.js?config=TeX-AMS_HTML-full"><\/script>')</script>


Many thanks again for a great service.

M
--
Mike Pearson
+44 (0)1223 764244
+44 (0)7752 562977
Millennium Mathematics Project,
Centre for Mathematical Sciences,
University of Cambridge
Cambridge CB3 0WA

Victor Ivrii

unread,
Mar 14, 2012, 5:35:54 AM3/14/12
to mathja...@googlegroups.com
On Wed, Mar 14, 2012 at 5:24 AM, Mike Pearson <gmp2...@gmail.com> wrote:
> Davide, Peter,
>
> Good to see MathJAX returning after the DNS glitch yesterday. Thanks for all the restorative work.
>
> One heartening thing was that we had quite a few error reports from our http://nrich.maths.org users. We have users :)
>
> A couple of things that I'd like to do to make things fallback more gracefully which  maybe you can help us with - I'm sure others will have similar needs:
>
> 1) We saw some machines replacing the greyed out source TeX with bright red error messages. This I think is new to MathJAX v2. Our users can often make sense of the source TeX, but the red error message obliterates the maths content completely. Is there a way to disable this message?

Load 2 last extensions (red shows error but as a part of the source code)

extensions: ["tex2jax.js","TeX/AMSmath.js","TeX/AMSsymbols.js","TeX/noErrors.js","TeX/noUndefined.js"],


--
========================
Victor Ivrii, Professor, Department of Mathematics, University of Toronto
http://www.math.toronto.edu/ivrii

Mike Pearson

unread,
Mar 14, 2012, 5:44:29 AM3/14/12
to mathja...@googlegroups.com
Davide, Peter,

Checking back, the red error messages appeared briefly in Firefox when we attempted to use the temporary CDN set up by Peter. So maybe this was more of a glitch than a real issue.

Mike

Mike Pearson

unread,
Mar 14, 2012, 5:46:32 AM3/14/12
to mathja...@googlegroups.com
Ah, thank you!

M

Peter Krautzberger

unread,
Mar 14, 2012, 8:38:27 AM3/14/12
to mathja...@googlegroups.com
Mike,

As Victor already mentioned, the noerror, noundefined extensions are the extensions that can prevent the error boxes. The documentation is at http://www.mathjax.org/docs/2.0/tex.html#noerrors

The errors yesterday may have been due to 2 different problems. a) I think I was too eager to send out the announcement and not all files had made it to the CDN (hence rendering failed) b) the CDN had its own technical quirks (webfonts didn't work reliably due to false headers). Again, our apologies for this inconvenience.

We'll look into the local fallback option but Simon's suggestions should work for now (thanks again, Simon!).

Peter.

Davide P. Cervone

unread,
Mar 14, 2012, 9:36:51 AM3/14/12
to mathja...@googlegroups.com
Mike:

Thanks for the encouraging remarks. Peter and I were both pretty
upset by the downtime yesterday, and regret the trouble it caused you.

> A couple of things that I'd like to do to make things fallback more
> gracefully which maybe you can help us with - I'm sure others will
> have similar needs:
>
> 1) We saw some machines replacing the greyed out source TeX with
> bright red error messages. This I think is new to MathJAX v2. Our
> users can often make sense of the source TeX, but the red error
> message obliterates the maths content completely. Is there a way to
> disable this message?

There are two types of error messages that MathJax will produce. The
first are syntax errors resulting from incorrect TeX (things like
unknown control sequences, missing braces, etc.) These are the ones
that are controlled by the noErrors and noUndefined extensions that
Victor suggested. When these AREN'T used, you would get a red message
on yellow background giving the TeX error that occurred. When they
ARE used, you will get a control sequence in red for an undefined
control sequence, and the original TeX with a black border for other
syntax errors.

You are using the TeX-AMS_HTML configuration which includes these
already, as you can see by opening the About MathJax dialog from the
MathJax contextual menu. So there is no need to add these to your
configuration.

The second type of error is a failure within the MathJax code itself.
Usually this is due to a failure to load one of the MathJax components
(e.g., one of the files doesn't load and MathJax times out waiting for
it). In this case, MathJax puts a red "[Math Processing Error]"
message in place of the mathematics. I suspect this is the one you
are seeing, and it is not affected by the noErrors or noUndefined
extensions. This is used when something is wrong within MathJax
itself. There is no easy way to turn this off (though you can set
what the text of it is). Because this indicates an internal error
occurring within MathJax itself, it is not easy to recover from that.
For example, it may not be possible to put back the original TeX code,
since it is not clear at what point MathJax stopped running.

You mentioned that this occurred for some people with Firefox with the
alternate CDN address that Peter set up, but that it was temporary.
Here is what I think happened. Firefox has a strict same-origin
policy that affects files obtained from a source other than the domain
of the page you are viewing, and they include web-based fonts in that
policy. So the CDN has special access control settings that allow
Firefox to load the MathJax fonts despite this policy. It turns out
that Amazon S3 doesn't process those settings, so Firefox users would
not be able to obtain the web fonts from the alternate CDN. In that
case, MathJax will switch to its image fonts. But as Peter mentioned,
he made the announcement of the alternate CDN before all the image
files were in place (since these are rarely used in most
circumstances). I suspect that your Firefox users were getting
switched over to image fonts, but the needed files weren't yet in
place, and so MathJax failed to load the needed files, and internal
errors occurs when it tried to use the data that those files contain,
causing the "[Math Processing Error]" messages.

> 2) Any thoughts on how to implement a local fallback? We saw a
> suggestion from Simon Woodhead on this yesterday which looks
> promising.
>
>> <!-- MathJax: Fall back to local if CDN offline but local image
>> fonts are not supported (saves >100MB) -->
>> <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML
>> "></script>
>> <script>window.MathJax || document.write('<script type="text/x-
>> mathjax-config">MathJax.Hub.Config({"HTML-CSS":{imageFont:null}});<
>> \/script><script src="<<PATH_TO_YOUR_LOCAL_MATHJAX>>MathJax.js?
>> config=TeX-AMS_HTML-full"><\/script>')</script>

This looks reasonable, but it does require a second installation
somewhere, either a local one of your own, or another public
location. I haven't tried it out, but it looks good.

Davide

Victor Ivrii

unread,
Mar 14, 2012, 10:52:45 AM3/14/12
to mathja...@googlegroups.com
If I understand correctly if MJ is not loaded at all (f.e. if it
should be loaded from CDN and CDN is down), no red messages, and no
processing at all: just TeX source. Red messages mean that MJ is
partially loaded and fails.

I thought about reserved server but it means a lag: MJ waits ***every
time*** for CDN to fail. May be better to have a local script
MathJaxFriend.js with a menu which configures where MJ is loaded from?

Victor

Davide P. Cervone

unread,
Mar 14, 2012, 1:33:11 PM3/14/12
to mathja...@googlegroups.com
> If I understand correctly if MJ is not loaded at all (f.e. if it
> should be loaded from CDN and CDN is down), no red messages, and no
> processing at all: just TeX source. Red messages mean that MJ is
> partially loaded and fails.

Right. It requires that at least MathJax.js is loaded in order to get
the red messages. If MathJax.js doesn't load, then none of MathJax
actions will be taken.

> I thought about reserved server but it means a lag: MJ waits ***every
> time*** for CDN to fail. May be better to have a local script
> MathJaxFriend.js with a menu which configures where MJ is loaded from?

I think it depends on the type of failure that occurs. The original
author's suggestion was to handle the case where the CDN is not
available at all. In that case, the secondary server will kick in and
make MathJax available. It will not wait for a MathJax timeout, since
MathJax will not be running. The suggested method does NOT do
anything about the case where MathJax.js is loaded, but then some
other component is unavailable. In that case, you would most likely
get the red "[Math Processing Error]" messages if the files where
MathJax's javascript files, or bad output if the files were the font
files.

Whether MathJax needs to wait for a timeout is also somewhat
complicated and depends on what is going wrong. If the MathJax.js has
been loaded and some other javascript file is unavailable, then most
browsers will receive an error (not a timeout), and will call the
onerror handler, so MathJax will know immediately that the file can't
be loaded and so will fail immediately. It is usually only if the
file contains some run-time error (so that it either doesn't compile
or doesn't run to completion) that MathJax will wait for that to
happen and eventually time out.

In the case yesterday, however, the CDN did not return an error
condition immediately, because it was itself waiting for mathjax.org
to respond to it, and so the CDN only returned the 504 error after
some delay. I don't know how long that delay is, and whether
MathJax's internal timeout was longer or shorter than that, but it
would cause MathJax to fail the same in either case. That is a rather
unusual circumstance (where the server itself doesn't know immediately
whether it will be able to ship the file).

You could certainly include a menu if you wanted to.

Davide


Mike Pearson

unread,
Mar 14, 2012, 2:04:03 PM3/14/12
to mathja...@googlegroups.com
Davide,

You are right, this was the message we were seeing, and I think you analysis of the situation is correct.

Mike

Reply all
Reply to author
Forward
0 new messages