Troubleshooting¶
This page collects the solution to some errors you may encounter when using Jina.
Debugging a Jina flow¶
Use dry_run
to test the connectivity of your pods.
from jina.flow import Flow
f = Flow().add(...)
with f:
f.dry_run()
Set callback
to print and check the output.
from jina.flow import Flow
f = Flow().add(...)
with f:
f.index(input_fn)
which prints out the protobuf message directly in the console after each request.
docs {
doc_id: 199
buffer: " See the License for the specific language governing permissions and\n"
chunks {
doc_id: 199
chunk_id: 595148142
text: "See the License for the specific language governing permissions and"
embedding {
buffer: "\354X<=C\241)>\355\325\273\276\225\300\306:C\324\020\276\372\256h\277\"\323\007</o\305>\000\242/\276r-\210>\221T\325\276 IT\275\\H\240\274\303\376\241=\323\341&\[email protected]\314>\317\376\3539\022\373C>T\201\230\275\023\305\333\275\236ro=\346\241\301<O)\250\276\326\'}<\365`\'?\363d\013>o\250\312=\202X\345=\320\311c\277\316\361!\276\224\n\303>\272\360\345\274=\236\216\276\014\363\021\275\325\245n<~\322\227\274Y\247X>\302L=\276\3224\233=\342\3210=M\267\240\276a\320\221\276\025\303\234>\313\214\201\276\367\263\020>\314\310\315=\335Uw>\025\217m\276[\356\374\275\216?\221\276J>\025\277J\370\265\275\016*\335=xr\236>\017o\272>\226\371\214>\006\036\014=\"\017\013\277ub)\276#<\004\276\rP\263>\037}F>\310\356\017>\365\250-\276\343\366\023?\343\374\235>\\\264\024>\372m\236>>>r\277\301\334H\276[\317\350\276rJ\306\276\370D\276\276\320$\002\275\333\353=\275`\033\017?\324\255\366\276\351\204\243=\345\000y\276\324\344\306\276\303v\266;\010b+?w\211k\275#V\301;\255\216\">\000\305\262=\277\372u>\nrI>S\375w\276\260\327E?\'5\244>\25697\276l\207\364\275\347Y;\275\267\274\020?ta\034\276\026\246\302=nFS\274u\317\247\274\361\270\340>8!w=\277\205\003\276\351.a\275\200y\245=\336\201\036\277\317DP\2765\243\254\275\232\005\344>M\[email protected]\276?\277->\273\227\313>\216\001M\276\233\366$=,\346\203\276\034S>\276\315\005\221>@%\200<\276-\032>\312m\312>\357\204\205>}`\007>r\323\323;0\032\210>\227\364\341>t\207U>EX\035>\363\266_\275\254o\300>q\244E>\016\301\306\276\237\370\204\275\275\377\203>\370\367\027?\031W\213\276\272\023\240\276\020\366\216>\304d\245\275\262\246\200\2767U\344\276!\374\257=\2433=\276\213\005\374=sh\323=\337\177\373\276\340\214C<\226\017N>\370\273\211\276\275\362u\276\010\036/\276\327;\333>t\n\261=:K\272>\033\227\321\274\230\270\240;\270\314\344\274!\374d>?.\013?\013\262\231>gK\177\276c\240|\276\254\243\207>\232\035\024>\273\367\236\276\375/\277>\305!T\275X5\035;)o\216\276\227\027\352>j\335\302=ql\006>\006T\321\276M1\271\275DR\340>\307\023\343\276\217\257\2679\005\231\317>R\t\177\275\260\261\226>\214\362\021?\177\215s=\343]}\277\214\226\201>G\252\001\276$\271\217=H\177\307=hs\234\275\200\025\035?\350t\377\276\255\250s\275an\330\275-\343\214\276Tp\371\276\246\263\006=\366\353\035<w\'\305=\2536\003>>\314\211\276\264q\'<\334Y\242\[email protected]\237\024=\220*[>\2715K=\254\347\251>\030B\276\274\377Z\223\276\373\346/=c\217]>\333.\330\276_\311\227\276a\356\037>x\217\004\275\265)\024?\332\300\303>2\225\353\27619\276>\035+]\276d\344#\276q]E\275q\032.>\346\337\262\275<KD<\013\226\"\276O\372\343\276$\034u>\2037\003\277k\374\004?\017\273\377\275\304\236\353\275V1\311>\232\033\223>i\210\256\2752\331\177\276\350\032\031?\373[\202\275\014\021\205\275\3431Y\276Hm\314\276\257>\253>\013d0=\300\377y\275\260\215\261>\200O\324>\277\252\023\274\304JP\273\003\252\230>\244\[email protected]=\0107H>5H\224>;<I>\tdy\275\314\226\236;\234\0066\277\272\214%=4#\260\2763\347\326\276\014\230G=\276\232\031\2777$\340\276\274\233[=\243\014\035?\2024\r\276\034}a>\200\200\213=\311p\351=\274\275\003\277N\026\367\276\004\272\277>\317\245\263>l\336\334<\022\307\240>\010)\010\277\333\224\372\276\201\021\020\277\347\322\323\275\365\212\263\276\351;*\275,c\217>Z\337\250=\322R\020>\222\352C\275\331sW\275\3032~=\260\362\003?\3768\014\276\223\344\361\275\001?\364\2762XZ>\036\220\345\276\010\244\300\276\207k\250\274\206\252\363\276\263x9>\007/\203\276vO\010\276\357V\201>\233\243\205>!\221\225\275\204J\217>\326\326h\276-*\372\276|G\373\276\272\033\336\276YA\324\275_\006.<\000\224\036\276\241CX>\266\223\330\276f<\204\275\237\272\203\300\300F\001\2760\365\211\276)\235\241\276\242\r\232=\005\310D\275\003\377q>n\226\323\276\302\274\224\276b\205\004\276\350\307\000\276\244\263\017\276\2457\251>\200\033\363>\"_O>\326\354\260>\306\303S\276\036\005)\275\356\022\262\276\025\371\224>\"^\027\276`X\222\276\002.(>\377V.\277F\242\307>/^L\273*\274\335\276H\262r>\331\333\344\276\345\'\010\277\233\235\211\274wW\363=\215i#>\"\017g>\272u\010\276v\377r\276S/I=\215\260\363=bJ\344>\376i\371\276\336F#\276\346\375\220<\203\336\214>\010`7\276\260\2565?\007\230\272\276;\311.\276\357\222\\\276\260\303\374\275P\227)?\333e\210\274\320jK\276A\001\206\276\3207\266\2724\nR\276!V\027\2759\2540?P\314\311>z\316\314\275\232\331\241=o\352\350>\025\320\366\2763\003\212\275\000\254\255\276\211\307\267\276d\253\226\276JDW\277\026\0344\276Y\017\324\275\247\346r>P{\223\275\276\0058>\304\351&\[email protected]\217\212\277\370\022\235\275]N\370\276S\016\352\274\3179\211\276\356P\200>2g\224\275\3423\333\276M\227\331\275\033\354\302\275:=\321>r0\200<\330\206\327\275\365\354\357=`E\276\276\365e \276\262\267,\277\222|U=\204\200K=\267\024F\276\277\361\325\275:k\"\276\006F\004=5(\013?\266o\000\277\007\262\037>(XR\2767\373\360>\253\312\317\276\365\024\270>\035\377\310\275\021G\326=t\205\216>8\234-\277\016\314o>P\303a>\311\351\266\275\322\312\230>\013\017a\275\355\214\345>;:Q\276\277U\023\277\302\237\222>Q\354\246=\237\3221?\260\3224>C\224\337=\241\003\276\275\341\352\n?$\[email protected];\343\214\311\276}\3535\277\030\256C\276H\276t\276`9\'\276;:\037\276\234F\235>\273\255\t\2772(\027>.\251\020=\347u\206\276U\324\211\274\032\370-\27612\231\275\310m\360>&/\242>\334\225\265\276\253\265\256=\215\334\030?\rw\201=r\305\265\276%5\210\276\275\")>\235\356\203=P\004\206>d\217h>\025\037\031<h9X>\362\261\263\276I9\312\275\237\367\314\2732w\263;\234\007\254\276\260`\320>0]\017>\301\355K\275aJ\337\2768\306\010\276\207C[\276\315\256\347>\2761T>\366S\234\275\037\003\201>\330V\261\275\373\341\001\276\210P\210\276\305\0236\273\210d\243>Y+B=3\235<\276\212\210\272\272\265)\001>#\005\'?\031\026s>j\364\231\275\031\337\t>\242\013`?UYd>6\201\250\2765gA=\004%e\276\374\262a\276/H\277>Kkc\275#\021\241\276d\005\332<\026j|>\205\222\203>\206\232|>\2328\255\276\314\007\322\275\266\036\310\276\220\254\361\276\037/\272>\230\246\254=\213\224\223=\260J\231\276\350)\005?\3732\200\276\245l\034\277]\027\311\275\250]\232\276\370{R\276U$0?c\377\233<\243\213h\276\235h\241=}%s\2760!\331\276\002\203\260\276$\r\035\277\261\345\005\276\207\t\204\276Y\022(=\2759\320=\356\026\314\276\260\300\002\275K\007\215=tZX>E\344\313>OG\206>\275\205j=\363n>>\2208\230\276\310\000\006\277\320\2113\277\250&\267\274AK\326=\"1\020\276|\340\215>w\347\367\275\204]\014\276\024\277\307\275\201,\014\277\226\204l>\312M\327\275\205I\317\276\236\317\021>\363\250d>h\017\006\276 \337\013\277r\222\314\275Q\265\317\276\377\036\234\275j\014\265>\307\247\013\277\373\254\252>\035u\254\275\217\314.;S\007\214\276\332\254\016\276\201\351\372>O\325\212\276e\007\037\2762v\037>\020U\342\276QZ\263>\014\252\356>\031\261\257>\033\231P\276\n1\310>\2447\212=\313\t\236>\371\373\213\276\363\316\264\274*u\231\275U^\244\276\363\345\r\275\274R\271\275\027\034?>?\255\n>\231\027\320>c\033\267\276.\316=>\022\243\251\276\3625\311>\0215\317\273W\222b\276\255\355\n>\311\354\023\275\024f\347\274>f\250>\211vn\275\254Qc\276\361B\003?0Ob\276\363z\002\277\025\234v\276#\373\206>\345Y\214\276\330\270G>\324\303\315\276?Fe\274\246\310\256>L\236\004\275\350;q\275\324\227\007\[email protected]\236\275\330\000\021?\036\003\372>\266\230\230>\241\323M>\025\370\014>\357\004M>:\343\022\276O\250\350=\250/\263<\025\036W\276R:\205\276\237Q\"?\034\374U?\317^\252\276\304\325\016\277\226\202\225<\345C\264\276W\240\240\273$\307\027>\355\247\303>\360\324\014\277N\201 ?\245(\002>W\207\322=\370\360\263>W\260k\276J\311\310\275pJ\204>\272\204i\276Z\215\014?S\306|>p\240\"=g\342\036?\3358\350\2767\201\265\275\274VS\274I\337Y>\016\201\375\275\346\231\235=\223V\233;7\202\342>\231?F>|\240Q>\334\202\014=\302\2019\276\014\336u\276\002\016\013<\344\333\237>\204\312\030?\006\017\330>\363\014\210>3\225\237=\324Y\254>B\'\323>_m\007>\363\'\023?\217\t\027>\306\371\274\2722\213~>\004\001\213>o\304\357>\366 z=\210\246i\275\304\025\312>\371\321\270=$V\235\274\221\223\234\276T\007\330\275\365\3631\275\363U\251\275\325\\\304=:\0371\2765T\223\276\r\201Z=\320\321`\275\207\374\204>\000\027[\275=\375\217\276|Yp\276\3031\373\275\343c\227\276\003^p\276\264\303H\277\355H\\\276v\036\277\276\272 \266>\026\353\256\275<6\222\276L\'\352\276\203L\246\276\327e\205\275\020\177\227>\233i\r\277\302\272\321=\005\034\\\274u.7\2764\316\263>\343D\013?\376=\325\276aS\337=j\266\254\2762\251\347\274\225>\266\275\007\370!>N[\361>\200PX>O\314\000?F\356\245\276oj\310\276\325\272==\233U\256>\352\332\007\277\002\201\317;\206q\263\271\300\014\325>\367N\246>\025\000\246=\204\\X>\345:\326>=r\273\276\3244B\276h\305\323>\346\211\263>G\320,\276\024\347\220>D\343;\274c\000!?a\364%\276v\r1=\303\214\264=\252\247\315>\265%\311>\031\342\001?\203\366\216\274\212\370\016\276]E\343\276\006vR>^rD=\310l\243<\215B\216\276>*\222>\210(\025>\256\[email protected]>\266\032W\277\025\177\331\275\234\001\010>\'\277]\276L\037\022\276S0{\2754/\010?\252\220\214\275s\372P\274\251-\256\276)E \276\277(a>O\347N> \356\371<\362\317\342\275\351(\320>"
shape: 768
dtype: "float32"
}
weight: 1.0
length: 1
}
weight: 1.0
length: 1
}
Exception iterating requests! often the case is that you define/send a bad input iterator to jina, please double check your input iterator
¶
As it said, often you have a badly written iterator. Use next()
to check if the iterator pops up things you want.
Often the mistake is missing ()
when feeding to the flow. For example, the following is wrong and will cause that errors:
def bytes_gen():
idx = 0
for g in glob.glob(GIF_BLOB)[:num_docs]:
with open(g, 'rb') as fp:
# print(f'im asking to read {idx}')
yield fp.read()
idx += 1
with f:
f.index(bytes_gen, batch_size=8)
It should be:
with f:
f.index(bytes_gen(), batch_size=8)
OSError: [Errno 24] Too many open files
¶
This often happens when replicas
/num_parallel
is set to a big number. Solution to that is to increase this (session-wise) allowance via:
ulimit -n 4096
objc[15934]: +[__NSPlaceholderDictionary initialize] may have been in progress in another thread when fork() was called.
¶
Probably MacOS only.
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
docker.errors.APIError: 409 Client Error: Conflict ("Conflict. The container name "/encode-1" is already in use by container "6aa5df721ee4820d47fa96d25d300450178fe92be6e90a4059e5d7d4ac6f7324". You have to remove (or rename) that container to be able to reuse that name.")
¶
docker stop $(docker ps -a -q)